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
Custom Animations and Transitions on iOS
Search
seyfeddin
December 13, 2014
Programming
2
190
Custom Animations and Transitions on iOS
The talk I gave at NSIstanbul's December Meetup
seyfeddin
December 13, 2014
Tweet
Share
More Decks by seyfeddin
See All by seyfeddin
14 Years of iOS: Lessons and Key Points
seyfoyun
1
900
iOS'te Tipografi
seyfoyun
0
270
Implementing Design Systems in Swift
seyfoyun
2
1k
Practical Testing in iOS
seyfoyun
0
98
Modern iOS Geliştirme
seyfoyun
0
360
Auto-Layout Öldü Mü? – NSIstanbul Ekim 2016
seyfoyun
0
370
Messaging as an Interaction — NSIstanbul April 2015
seyfoyun
1
130
Being a "Mobile Designer"
seyfoyun
5
550
Twitter Fabric (Turkish)
seyfoyun
3
320
Other Decks in Programming
See All in Programming
もう僕は OpenAPI を書きたくない
sgash708
6
1.9k
Formの複雑さに立ち向かう
bmthd
1
940
Serverless Rust: Your Low-Risk Entry Point to Rust in Production (and the benefits are huge)
lmammino
1
160
Kotlinの開発でも AIをいい感じに使いたい / Making the Most of AI in Kotlin Development
kohii00
5
1.4k
Jakarta EE meets AI
ivargrimstad
0
460
Rubyと自由とAIと
yotii23
6
1.8k
SwiftUI移行のためのインプレッショントラッキング基盤の構築
kokihirokawa
0
150
Domain-Driven Design (Tutorial)
hschwentner
13
22k
責務と認知負荷を整える! 抽象レベルを意識した関心の分離
yahiru
8
1.4k
CloudNativePGを布教したい
nnaka2992
0
120
『テスト書いた方が開発が早いじゃん』を解き明かす #phpcon_nagoya
o0h
PRO
9
2.5k
たのしいSocketのしくみ / Socket Under a Microscope
coe401_
8
1.4k
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7.1k
Agile that works and the tools we love
rasmusluckow
328
21k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
7k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
A Philosophy of Restraint
colly
203
16k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.1k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Designing for humans not robots
tammielis
250
25k
Writing Fast Ruby
sferik
628
61k
How STYLIGHT went responsive
nonsquared
98
5.4k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
46
2.3k
Transcript
NSIstanbul C O M M U N I T Y
Custom Animations and Transitions on iOS
Before
Interaction Designer
Form
None
Origami
None
Form
Custom Animations
A Primer on Animations
A Primer on Animations [UIView animateWithDuration:1.0 animations:^{ [self.view layoutIfNeeded]; }
completion:^{ }]; CAAnimation
A Primer on Animations UIView CALayer
A Primer on Animations CALayer [_loadingView.layer addAnimation:rotateAnimation forKey:@"rotateAnimation"];
A Primer on Animations CAAnimation CABasicAnimation CAKeyframeAnimation CAGroupAnimation
A Primer on Animations CAAnimation Keys rotation scale position height
origin strokeStart strokeEnd width
Basic Animations
Custom Animations
None
None
These animations require a lot of testing and trying.
These animations require a lot of testing and trying. How?
QuartzCode
None
Shape Particle Emitter Animations Chaining Replicator Image Text
Very Complex Animations
None
Custom Animations
Custom Transitions
iOS6 UIModalTransitions UINavigationController Transitions UIModalTransitionStyleCoverVertical UIModalTransitionStylePartialCurl UIModalTransitionStyleHorizontalFlip UIModalTransitionStyleCrossDissolve UIViewAnimationTransitionNone UIViewAnimationTransitionFlipFromLeft
UIViewAnimationTransitionFlipFromRight UIViewAnimationTransitionCurlUp UIViewAnimationTransitionCurlDown Custom Transitions
Custom Transitions iOS7 toVC.presentationStyle = UIModalPresentationCustom; toVC.transitioningDelegate = toVC; <UIViewControllerTransitioningDelegate>
<UIViewControllerTransitioningDelegate> -(id<UIViewControllerAnimatedTransitioning>)animationControllerForPresentedController: (UIViewController *)presented presentingController:(UIViewController *)presenting sourceController:(UIViewController *)source -(id<UIViewControllerAnimatedTransitioning>)animationControllerForDismissedController: (UIViewController
*)dismissed
<UIViewControllerAnimatedTransitioning> -(NSTimeInterval)transitionDuration: (id<UIViewControllerContextTransitioning>)transitionContext -(void)animateTransition: (id<UIViewControllerContextTransitioning>)transitionContext
transitionContext UIViewController *fromViewController = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey]; UIViewController *toViewController = [transitionContext
viewControllerForKey:UITransitionContextToViewControllerKey];
- (id<UIViewControllerAnimatedTransitioning>) navigationController:(UINavigationController *)navigationController animationControllerForOperation:(UINavigationControllerOperation)operation fromViewController:(UIViewController*)fromVC toViewController:(UIViewController*)toVC { if (operation
== UINavigationControllerOperationPush) { return self.animator; } return nil; } Navigation Transitions
Thanks