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
iOS'te Tipografi
seyfoyun
0
200
Implementing Design Systems in Swift
seyfoyun
2
690
Practical Testing in iOS
seyfoyun
0
78
Modern iOS Geliştirme
seyfoyun
0
330
Auto-Layout Öldü Mü? – NSIstanbul Ekim 2016
seyfoyun
0
340
Messaging as an Interaction — NSIstanbul April 2015
seyfoyun
1
120
Being a "Mobile Designer"
seyfoyun
5
530
Twitter Fabric (Turkish)
seyfoyun
3
310
Storyboards vs. XIBs vs Code
seyfoyun
0
170
Other Decks in Programming
See All in Programming
Synchronizationを支える技術
s_shimotori
1
140
レガシーな Android アプリのリアーキテクチャ戦略
oidy
1
170
[PyCon Korea 2024 Keynote] 커뮤니티와 파이썬, 그리고 우리
beomi
0
110
僕がつくった48個のWebサービス達
yusukebe
17
16k
プロジェクト新規参入者のリードタイム短縮の観点から見る、品質の高いコードとアーキテクチャを保つメリット
d_endo
1
970
破壊せよ!データ破壊駆動で考えるドメインモデリング / data-destroy-driven
minodriven
15
3.8k
とにかくAWS GameDay!AWSは世界の共通言語!.pdf / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
0
280
詳細解説! ArrayListの仕組みと実装
yujisoftware
0
450
Prompt Engineering for Developers @ AWS Community Day Adria 2024
slobodan
0
120
Go言語でターミナルフレンドリーなAIコマンド、afaを作った/fukuokago20_afa
monochromegane
2
140
のびしろを広げる巻き込まれ力:偶然を活かすキャリアの作り方/oso2024
takahashiikki
1
360
qmuntal/stateless のススメ
sgash708
0
110
Featured
See All Featured
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
280
Rails Girls Zürich Keynote
gr2m
93
13k
Art, The Web, and Tiny UX
lynnandtonic
296
20k
Done Done
chrislema
181
16k
Scaling GitHub
holman
458
140k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
5
140
What's new in Ruby 2.0
geeforr
342
31k
Ruby is Unlike a Banana
tanoku
96
11k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.6k
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