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
iOS 7 - View Controllers Custom Transitions (Co...
Search
Vincent Tourraine
April 10, 2014
Programming
0
150
iOS 7 - View Controllers Custom Transitions (CocoaHeads Lyon avril 2014)
iOS 7 - Custom Transitions for View Controllers
Pour CocoaHeads Lyon, 10 avril 2014
Vincent Tourraine
April 10, 2014
Tweet
Share
More Decks by Vincent Tourraine
See All by Vincent Tourraine
iOS 7 - Background Fetching (CocoaHeads Lyon octobre 2013)
vtourraine
0
230
Activity View Controller (CocoaHeads Lyon octobre 2013)
vtourraine
0
130
Other Decks in Programming
See All in Programming
Improving my own Ruby thereafter
sisshiki1969
1
160
ユーザーも開発者も悩ませない TV アプリ開発 ~Compose の内部実装から学ぶフォーカス制御~
taked137
0
190
ファインディ株式会社におけるMCP活用とサービス開発
starfish719
0
2.1k
今だからこそ入門する Server-Sent Events (SSE)
nearme_tech
PRO
3
260
テストカバレッジ100%を10年続けて得られた学びと品質
mottyzzz
2
610
Introducing ReActionView: A new ActionView-compatible ERB Engine @ Rails World 2025, Amsterdam
marcoroth
0
710
Tool Catalog Agent for Bedrock AgentCore Gateway
licux
7
2.5k
go test -json そして testing.T.Attr / Kyoto.go #63
utgwkk
3
320
詳解!defer panic recover のしくみ / Understanding defer, panic, and recover
convto
0
250
奥深くて厄介な「改行」と仲良くなる20分
oguemon
1
570
The Past, Present, and Future of Enterprise Java with ASF in the Middle
ivargrimstad
0
180
もうちょっといいRubyプロファイラを作りたい (2025)
osyoyu
1
460
Featured
See All Featured
Designing for Performance
lara
610
69k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
Rails Girls Zürich Keynote
gr2m
95
14k
Embracing the Ebb and Flow
colly
87
4.8k
The Straight Up "How To Draw Better" Workshop
denniskardys
236
140k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
Visualization
eitanlees
148
16k
Bash Introduction
62gerente
615
210k
Six Lessons from altMBA
skipperchong
28
4k
Writing Fast Ruby
sferik
628
62k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
188
55k
Code Review Best Practice
trishagee
71
19k
Transcript
View Controller Custom Transitions CocoaHeads Lyon - avril 2014 Vincent
Tourraine - shazino
Faciliter la personnalisation des transitions entre view controllers (a.k.a. du
nouveau dans le push/pop)
Navigation Controller delegate - (id<UIViewControllerAnimatedTransitioning>) navigationController: (UINavigationController *)navigationController animationControllerForOperation: (UINavigationControllerOperation)operation
fromViewController:(UIViewController *)fromVC toViewController:(UIViewController *)toVC { if (operation == UINavigationControllerOperationPush) { return self.animator; } return nil; }
“Animator” object @interface Animator : NSObject <UIViewControllerAnimatedTransitioning> ! @end
- (NSTimeInterval)transitionDuration: (id <UIViewControllerContextTransitioning>)transitionContext { return 0.25; } “Animator” object
- (void)animateTransition: (id<UIViewControllerContextTransitioning>)transitionContext { UIViewController *toVC = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey]; UIViewController
*fromVC = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey]; ! [[transitionContext containerView] addSubview:toVC.view]; toVC.view.alpha = 0; [UIView animateWithDuration:[self transitionDuration:transitionContext] animations:^{ fromVC.view.transform = CGAffineTransformMakeScale(0.1, 0.1); toVC.view.alpha = 1; } completion:^(BOOL finished) { fromVC.view.transform = CGAffineTransformIdentity; [transitionContext completeTransition:![transitionContext transitionWasCancelled]]; }]; } “Animator” object
Navigation Controller delegate - (id <UIViewControllerInteractiveTransitioning>) navigationController: (UINavigationController*)navigationController interactionControllerForAnimationController: (id
<UIViewControllerAnimatedTransitioning>)animationController { return self.interactionController; }
Plus d’infos • WWDC 2013 #218 Custom Transitions using View
Controllers http://asciiwwdc.com/2013/sessions/218 • objc.io #5 View Controller Transitions http://www.objc.io/issue-5/view-controller-transitions.html