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.5k
Markdownをリアルタイムに解析する
nakajijapan
4
4.3k
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
250
業務で絶対必要にならない技術
nakajijapan
0
770
インタラクションデザインと実装
nakajijapan
1
760
Other Decks in Technology
See All in Technology
社内イベント管理システムを1週間でAKSからACAに移行した話し
shingo_kawahara
0
190
私なりのAIのご紹介 [2024年版]
qt_luigi
1
120
プロダクト開発を加速させるためのQA文化の築き方 / How to build QA culture to accelerate product development
mii3king
1
270
Amazon VPC Lattice 最新アップデート紹介 - PrivateLink も似たようなアップデートあったけど違いとは
bigmuramura
0
200
How to be an AWS Community Builder | 君もAWS Community Builderになろう!〜2024 冬 CB募集直前対策編?!〜
coosuke
PRO
2
2.8k
Fanstaの1年を大解剖! 一人SREはどこまでできるのか!?
syossan27
2
170
10分で学ぶKubernetesコンテナセキュリティ/10min-k8s-container-sec
mochizuki875
3
360
どちらを使う?GitHub or Azure DevOps Ver. 24H2
kkamegawa
0
880
オプトインカメラ:UWB測位を応用したオプトイン型のカメラ計測
matthewlujp
0
180
APIとはなにか
mikanichinose
0
100
PHPからGoへのマイグレーション for DMMアフィリエイト
yabakokobayashi
1
170
マイクロサービスにおける容易なトランザクション管理に向けて
scalar
0
140
Featured
See All Featured
Thoughts on Productivity
jonyablonski
67
4.4k
VelocityConf: Rendering Performance Case Studies
addyosmani
326
24k
The Pragmatic Product Professional
lauravandoore
32
6.3k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Keith and Marios Guide to Fast Websites
keithpitt
410
22k
What's in a price? How to price your products and services
michaelherold
243
12k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.3k
Faster Mobile Websites
deanohume
305
30k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
66k
Six Lessons from altMBA
skipperchong
27
3.5k
Optimising Largest Contentful Paint
csswizardry
33
3k
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.