Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Shari
Search
nakajijapan
February 08, 2017
Technology
1
2.5k
Shari
Kyobashi.swift x AKIBA.swift 合同勉強会
https://kyobashi-swift.connpass.com/event/48794/
nakajijapan
February 08, 2017
Tweet
Share
More Decks by nakajijapan
See All by nakajijapan
サービスにおけるDesign Systemの構築
nakajijapan
6
3.4k
Markdownをリアルタイムに解析する
nakajijapan
4
4.2k
Firebase Authorization
nakajijapan
0
200
Intoducing Izumo
nakajijapan
1
1.8k
Practical CloudKit
nakajijapan
1
1.6k
Introducing to Ajimi - プロダクトを味見していこう
nakajijapan
0
2k
Japan Apple Pay Development
nakajijapan
0
240
業務で絶対必要にならない技術
nakajijapan
0
750
インタラクションデザインと実装
nakajijapan
1
740
Other Decks in Technology
See All in Technology
Amazon ECS & AWS Fargate 今昔物語 / past and present stories of Amazon ECS and AWS Fargate
iselegant
16
2.9k
Oracle Database 23ai 新機能#4 Application Continuity
oracle4engineer
PRO
0
130
Cosmos DB で持続可能な RAG を実現しよう!~ AOAI Dev Day ふりかえりを添えて / Sustainable RAG with Cosmos DB with recap AOAI Dev Day
miyake
0
130
令和最新版 Perlコーディングガイド
anatofuz
5
4.1k
AWS Lambdaで実現するスケーラブルで低コストなWebサービス構築/YAPC::Hakodate2024
fujiwara3
7
3.7k
From LibreOffice to « La Suite » : providing civil servants with Free Software sovereign tools
bluehats
0
100
組織デバイスのための効率的なアプリケーション更新戦略
kenchan0130
0
360
パートナー企業のテクニカルサポートエンジニアとして気になる、より良い AWS サポートの利活用について
kazzpapa3
0
110
Low Latency Join Method for Distributed DBMS
yugabytejapan
0
180
Vespaを利用したテクいベクトル検索
szdr
2
200
CData Virtuality を活かせるキーシナリオと製品デモ
cdataj
0
350
AWSの初級者向けAI・ML資格『AWS Certified AI Practitioner』の傾向と対策/So You Want To Pass AWS Certified AI Practitioner
quiver
0
610
Featured
See All Featured
Navigating Team Friction
lara
183
14k
The Cost Of JavaScript in 2023
addyosmani
43
5.9k
The Art of Programming - Codeland 2020
erikaheidi
51
13k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
240
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
Designing on Purpose - Digital PM Summit 2013
jponch
114
6.9k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
Product Roadmaps are Hard
iamctodd
PRO
48
10k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
46
4.9k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
26
4.1k
StorybookのUI Testing Handbookを読んだ
zakiyama
26
5.1k
Transcript
,ZPCBTIJTXJGUY",*#"TXJGU !OBLBKJKBQBO Shari minneʹಋೖͯ̍͠
AKIBA.swift Kyobashi.swift Shibuya.swift
@nakajijapan GMO PEPABO inc. Principal Engineer iOS / Web /
OS X About Me Daichi Nakajima
ϋϯυϝΠυ࡞Λ ചΕΔɺങ͑Δɻ ࠃ࠷େڃͷ ϋϯυϝΠυϚʔέοτ
NKJMultiMovieCaptureView NKJMovieComposer NKJPagerViewController PhotoSlider Teiten GitHub Sengiri Shari frustration.me Kazaguruma
Shari
None
ࣷར • ਣ൧ • ωλͷҾཱ͖ͯ
What is Shari?
UI Component IUUQTHJUIVCDPNOBLBKJKBQBO4IBSJ
None
Why?
Why • Χʔτͷࡏݿมߋ • UIPickerViewΛར༻͍ͯͨ͠ • ૢ࡞͕̍εςοϓ͍ • தԝஔ͕ετϨε
Why • Χʔτͷࡏݿมߋ • UIPickerViewΛར༻͍ͯͨ͠ • ૢ࡞͕̍εςοϓ͍ • தԝஔ͕ετϨε ࡏݿมߋʹ̍ɺ͕̎΄ͱΜͲ
ղܾ͍ͤͨ͞
Want • UIPickerViewͷସ • ͳΔ͘؆୯ʹ • େྔͷࡏݿΛબ͢ΔϢʔβߟྀ
Goal
None
Try!
Animation
UIPercentDrivenInte ractiveTransition
UIPercentDrivenInteractiveTransition • Interactively control view controller • Percent Driven •
update(_:), cancel(), finish() • Using gesture recognizger $MBTT IUUQTEFWFMPQFSBQQMFDPNSFGFSFODFVJLJUVJQFSDFOUESJWFOJOUFSBDUJWFUSBOTJUJPO
UIViewControllerAni matorTransitioning
UIViewControllerAnimatorTransitioning • Custom ViewController Transition • Define how animation you
want to make 1SPUPDPM
Πέϧ
ΠέφΠ
Problem
Problem • ࠷ॳ͔Β࠷ޙ·Ͱͷදݱ͔͠Ͱ͖ͳ͍ • ్தͷUIͷ੍ޚ͕ೖΕΒΕͳ͍
❌
None
Implementation • Using Container View Controller
Half
Implementation modalNavigationController.parentNavigationController = navigationController navigationController?.si.presentViewController( toViewController: modalNavigationController ) • Call
Customized Container View Controller
Implementation func presentViewController(toViewController:UIViewController) { toViewController.beginAppearanceTransition(true, animated: true) ModalAnimator.present(toView: toViewController.view, fromView:
parentTargetView) { [weak self] in guard let strongSelf = self else { return } toViewController.endAppearanceTransition() toViewController.didMove(toParentViewController: strongSelf.base) } let tapGestureRecognizer = UITapGestureRecognizer(target: base, action: #selector(UINavigationController.overlayViewDidTap(gestureRecognizer:))) let overlayView = ModalAnimator.overlayView(fromView: parentTargetView) overlayView!.addGestureRecognizer(tapGestureRecognizer) }
Implementation func presentViewController(toViewController:UIViewController) { toViewController.beginAppearanceTransition(true, animated: true) ModalAnimator.present(toView: toViewController.view, fromView:
parentTargetView) { [weak self] in guard let strongSelf = self else { return } toViewController.endAppearanceTransition() toViewController.didMove(toParentViewController: strongSelf.base) } let tapGestureRecognizer = UITapGestureRecognizer(target: base, action: #selector(UINavigationController.overlayViewDidTap(gestureRecognizer:))) let overlayView = ModalAnimator.overlayView(fromView: parentTargetView) overlayView!.addGestureRecognizer(tapGestureRecognizer) } ͚ͩදࣔ͢ΔΞχϝʔγϣϯ
Transition Background option
Implementation public class ShariNavigationController: UINavigationController { func handlePanGesture(gestureRecognizer: UIPanGestureRecognizer) {
(..snip..) case .changed: var frame = view.frame frame.origin.y += degreeY frame.size.height += -degreeY view.frame = frame ModalAnimator.transitionBackgroundView( overlayView: backgroundView, location: location) (..snip..) • Get frame using UIPanGestureRecognizer
Implementation public class func transitionBackgroundView(overlayView: UIView, location:CGPoint) { let screenShotView
= ModalAnimator.screenShotView(overlayView: overlayView) let scale = self.map( value: location.y, inMin: 0, inMax: UIScreen.main.bounds.height, outMin: 0.9, outMax: 1.0) let transform = CATransform3DMakeScale(scale, scale, 1) screenShotView.layer.removeAllAnimations() screenShotView.layer.transform = transform screenShotView.layoutIfNeeded() } • Transition in real time 5SBOTGFSBNPVOUPGNPWFNFOU (FU*NBHF
None
Conclusion
Conclusion • ؆୯ʂʁ • ঢ়گΛ͑ͯϑΟʔυόοΫΛఏڙͰ͖Δ • ίϯςΩετΛҡ࣋Ͱ͖Δ • ϛεΛࣄલʹ͛Δ
Conclusion • minneͷσβΠϯίϯϙʔωϯτͷҰͭ • Χʔτ - ࡏݿมߋ • ചΕͨͷ -
ߜΓࠐΈ • ࡞ը໘ - Φϓγϣϯબ
Shari
Thanks.