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
780
iOS'te Tipografi
seyfoyun
0
240
Implementing Design Systems in Swift
seyfoyun
2
940
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
情報漏洩させないための設計
kubotak
1
130
Webエンジニア主体のモバイルチームの 生産性を高く保つためにやったこと
igreenwood
0
330
快速入門可觀測性
blueswen
0
350
責務を分離するための例外設計 - PHPカンファレンス 2024
kajitack
2
680
Fibonacci Function Gallery - Part 1
philipschwarz
PRO
0
220
「とりあえず動く」コードはよい、「読みやすい」コードはもっとよい / Code that 'just works' is good, but code that is 'readable' is even better.
mkmk884
3
280
テスト自動化失敗から再挑戦しチームにオーナーシップを委譲した話/STAC2024 macho
ma_cho29
1
1.3k
Beyond ORM
77web
5
660
CSC305 Lecture 26
javiergs
PRO
0
140
見えないメモリを観測する: PHP 8.4 `pg_result_memory_size()` とSQL結果のメモリ管理
kentaroutakeda
0
330
StarlingMonkeyを触ってみた話 - 2024冬
syumai
3
270
コンテナをたくさん詰め込んだシステムとランタイムの変化
makihiro
1
130
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
247
1.3M
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
32
2.7k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
Agile that works and the tools we love
rasmusluckow
328
21k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Making the Leap to Tech Lead
cromwellryan
133
9k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Testing 201, or: Great Expectations
jmmastey
40
7.1k
Automating Front-end Workflow
addyosmani
1366
200k
Done Done
chrislema
181
16k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
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