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
850
iOS'te Tipografi
seyfoyun
0
260
Implementing Design Systems in Swift
seyfoyun
2
970
Practical Testing in iOS
seyfoyun
0
94
Modern iOS Geliştirme
seyfoyun
0
350
Auto-Layout Öldü Mü? – NSIstanbul Ekim 2016
seyfoyun
0
360
Messaging as an Interaction — NSIstanbul April 2015
seyfoyun
1
130
Being a "Mobile Designer"
seyfoyun
5
540
Twitter Fabric (Turkish)
seyfoyun
3
320
Other Decks in Programming
See All in Programming
20241217 競争力強化とビジネス価値創出への挑戦:モノタロウのシステムモダナイズ、開発組織の進化と今後の展望
monotaro
PRO
0
290
traP の部内 ISUCON とそれを支えるポータル / PISCON Portal
ikura_hamu
0
180
Внедряем бюджетирование, или Как сделать хорошо?
lamodatech
0
940
PHPとAPI Platformで作る本格的なWeb APIアプリケーション(入門編) / phpcon 2024 Intro to API Platform
ttskch
0
390
PHPで学ぶプログラミングの教訓 / Lessons in Programming Learned through PHP
nrslib
4
1.1k
『改訂新版 良いコード/悪いコードで学ぶ設計入門』活用方法−爆速でスキルアップする!効果的な学習アプローチ / effective-learning-of-good-code
minodriven
28
4.2k
各クラウドサービスにおける.NETの対応と見解
ymd65536
0
250
ドメインイベント増えすぎ問題
h0r15h0
2
570
watsonx.ai Dojo #6 継続的なAIアプリ開発と展開
oniak3ibm
PRO
0
170
Amazon Nova Reelの可能性
hideg
0
200
カンファレンス動画鑑賞会のススメ / Osaka.swift #1
hironytic
0
170
Fixstars高速化コンテスト2024準優勝解法
eijirou
0
190
Featured
See All Featured
Optimising Largest Contentful Paint
csswizardry
33
3k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Statistics for Hackers
jakevdp
797
220k
Rails Girls Zürich Keynote
gr2m
94
13k
It's Worth the Effort
3n
183
28k
Writing Fast Ruby
sferik
628
61k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
127
18k
jQuery: Nuts, Bolts and Bling
dougneiner
62
7.6k
What's in a price? How to price your products and services
michaelherold
244
12k
The Pragmatic Product Professional
lauravandoore
32
6.4k
How to Think Like a Performance Engineer
csswizardry
22
1.3k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
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