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
マルチプロダクトな開発組織で 「開発生産性」に向き合うために試みたこと / Improving Multi-Product Dev Productivity
sugamasao
1
310
IBC 2024 動画技術関連レポート / IBC 2024 Report
cyberagentdevelopers
PRO
1
110
SREが投資するAIOps ~ペアーズにおけるLLM for Developerへの取り組み~
takumiogawa
1
450
Security-JAWS【第35回】勉強会クラウドにおけるマルウェアやコンテンツ改ざんへの対策
4su_para
0
180
ノーコードデータ分析ツールで体験する時系列データ分析超入門
negi111111
0
420
ISUCONに強くなるかもしれない日々の過ごしかた/Findy ISUCON 2024-11-14
fujiwara3
8
880
Lexical Analysis
shigashiyama
1
150
Amazon CloudWatch Network Monitor のススメ
yuki_ink
1
210
開発生産性を上げながらビジネスも30倍成長させてきたチームの姿
kamina_zzz
2
1.7k
100 名超が参加した日経グループ横断の競技型 AWS 学習イベント「Nikkei Group AWS GameDay」の紹介/mediajaws202411
nikkei_engineer_recruiting
1
170
心が動くエンジニアリング ── 私が夢中になる理由
16bitidol
0
100
Taming you application's environments
salaboy
0
200
Featured
See All Featured
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
24k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Visualization
eitanlees
145
15k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
370
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
Site-Speed That Sticks
csswizardry
0
28
How GitHub (no longer) Works
holman
310
140k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
0
110
Ruby is Unlike a Banana
tanoku
97
11k
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.