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.6k
Introducing to Ajimi - プロダクトを味見していこう
nakajijapan
0
2k
Japan Apple Pay Development
nakajijapan
0
240
業務で絶対必要にならない技術
nakajijapan
0
760
インタラクションデザインと実装
nakajijapan
1
740
Other Decks in Technology
See All in Technology
とあるユーザー企業におけるリスクベースで考えるセキュリティ業務のお話し
4su_para
3
320
【若手エンジニア応援LT会】AWS Security Hubの活用に苦労した話
kazushi_ohata
0
160
Commitment vs Harrisonism - Keynote for Scrum Niseko 2024
miholovesq
6
1.1k
日経電子版におけるリアルタイムレコメンドシステム開発の事例紹介/nikkei-realtime-recommender-system
yng87
1
490
Aurora_BlueGreenDeploymentsやってみた
tsukasa_ishimaru
1
120
AWS re:Inventを徹底的に楽しむためのTips / Tips for thoroughly enjoying AWS re:Invent
yuj1osm
1
560
クライアントサイドでよく使われる Debounce処理 をサーバサイドで3回実装した話
yoshiori
1
150
AIを駆使したゲーム開発戦略: 新設AI組織の取り組み / sge-ai-strategy
cyberagentdevelopers
PRO
1
130
[JAWS-UG金沢支部×コンテナ支部合同企画]コンテナとは何か
furuton
3
240
コンテンツを支える 若手ゲームクリエイターの アートディレクションの事例紹介 / cagamefi-game
cyberagentdevelopers
PRO
1
120
Amazon_CloudWatch_ログ異常検出_導入ガイド
tsujiba
4
1.5k
「 SharePoint 難しい」ってよく聞くけど、そんなに言うなら8歳の息子に試してもらった
taichinakamura
1
600
Featured
See All Featured
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
92
16k
A Modern Web Designer's Workflow
chriscoyier
692
190k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
13
1.9k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
228
52k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
32
1.8k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
7.9k
Git: the NoSQL Database
bkeepers
PRO
425
64k
The Cult of Friendly URLs
andyhume
78
6k
Art, The Web, and Tiny UX
lynnandtonic
296
20k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
790
Navigating Team Friction
lara
183
14k
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.