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
CSC305 Lecture 13
javiergs
PRO
0
340
釣り地図SNSにおける有料機能の実装
nokonoko1203
0
200
data-viz-talk-cz-2025
lcolladotor
0
110
AI 駆動開発におけるコミュニティと AWS CDK の価値
konokenj
5
320
퇴근 후 1억이 거래되는 서비스 만들기 | 내가 AI를 사용하는 방법
maryang
2
300
Vueのバリデーション、結局どれを選べばいい? ― 自作バリデーションの限界と、脱却までの道のり ― / Which Vue Validation Library Should We Really Use? The Limits of Self-Made Validation and How I Finally Moved On
neginasu
3
1.8k
KoogではじめるAIエージェント開発
hiroaki404
1
260
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
660
Pythonに漸進的に型をつける
nealle
1
150
ALL CODE BASE ARE BELONG TO STUDY
uzulla
29
6.9k
CSC305 Lecture 12
javiergs
PRO
0
250
ノーコードからの脱出 -地獄のデスロード- / Escape from Base44
keisuke69
0
300
Featured
See All Featured
RailsConf 2023
tenderlove
30
1.3k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
YesSQL, Process and Tooling at Scale
rocio
174
15k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Large-scale JavaScript Application Architecture
addyosmani
514
110k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
Unsuck your backbone
ammeep
671
58k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
A Tale of Four Properties
chriscoyier
161
23k
Typedesign – Prime Four
hannesfritz
42
2.8k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.7k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
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