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
120
Other Decks in Programming
See All in Programming
GitHub Copilot and GitHub Codespaces Hands-on
ymd65536
1
120
設計やレビューに悩んでいるPHPerに贈る、クリーンなオブジェクト設計の指針たち
panda_program
6
1.4k
AIコーディング道場勉強会#2 君(エンジニア)たちはどう生きるか
misakiotb
1
250
Select API from Kotlin Coroutine
jmatsu
1
190
ruby.wasmで多人数リアルタイム通信ゲームを作ろう
lnit
2
270
[初登壇@jAZUG]アプリ開発者が気になるGoogleCloud/Azure+wasm/wasi
asaringo
0
130
Julia という言語について (FP in Julia « SIDE: F ») for 関数型まつり2025
antimon2
3
980
A2A プロトコルを試してみる
azukiazusa1
2
1.1k
つよそうにふるまい、つよい成果を出すのなら、つよいのかもしれない
irof
1
300
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
46
31k
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
250
Composerが「依存解決」のためにどんな工夫をしているか #phpcon
o0h
PRO
1
230
Featured
See All Featured
Build The Right Thing And Hit Your Dates
maggiecrowley
36
2.8k
Writing Fast Ruby
sferik
628
61k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Practical Orchestrator
shlominoach
188
11k
Fireside Chat
paigeccino
37
3.5k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
281
13k
YesSQL, Process and Tooling at Scale
rocio
173
14k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Site-Speed That Sticks
csswizardry
10
660
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
35
2.3k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
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