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.6k
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
210
Intoducing Izumo
nakajijapan
1
1.8k
Practical CloudKit
nakajijapan
1
1.7k
Introducing to Ajimi - プロダクトを味見していこう
nakajijapan
0
2k
Japan Apple Pay Development
nakajijapan
0
240
業務で絶対必要にならない技術
nakajijapan
0
760
インタラクションデザインと実装
nakajijapan
1
750
Other Decks in Technology
See All in Technology
Adopting Jetpack Compose in Your Existing Project - GDG DevFest Bangkok 2024
akexorcist
0
100
ドメインの本質を掴む / Get the essence of the domain
sinsoku
2
150
Incident Response Practices: Waroom's Features and Future Challenges
rrreeeyyy
0
160
B2B SaaSから見た最近のC#/.NETの進化
sansantech
PRO
0
720
rootlessコンテナのすゝめ - 研究室サーバーでもできる安全なコンテナ管理
kitsuya0828
3
380
Lambdaと地方とコミュニティ
miu_crescent
2
370
Shopifyアプリ開発における Shopifyの機能活用
sonatard
4
250
Engineer Career Talk
lycorp_recruit_jp
0
130
100 名超が参加した日経グループ横断の競技型 AWS 学習イベント「Nikkei Group AWS GameDay」の紹介/mediajaws202411
nikkei_engineer_recruiting
1
170
【若手エンジニア応援LT会】ソフトウェアを学んできた私がインフラエンジニアを目指した理由
kazushi_ohata
0
150
開発生産性を上げながらビジネスも30倍成長させてきたチームの姿
kamina_zzz
2
1.7k
Terraform未経験の御様に対してどの ように導⼊を進めていったか
tkikuchi
2
430
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
427
64k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
109
49k
Rails Girls Zürich Keynote
gr2m
94
13k
Unsuck your backbone
ammeep
668
57k
Making Projects Easy
brettharned
115
5.9k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
A Philosophy of Restraint
colly
203
16k
Bash Introduction
62gerente
608
210k
RailsConf 2023
tenderlove
29
900
Happy Clients
brianwarren
98
6.7k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.2k
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.