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 (CocoaHeads Lyon avril 2014)
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
200
Activity View Controller (CocoaHeads Lyon octobre 2013)
vtourraine
0
110
Other Decks in Programming
See All in Programming
小さな開発会社を作った理由
polidog
0
1.9k
Activities at Cairo Library
cairolibrary720
0
1.2k
CSC307 Lecture 06
javiergs
PRO
0
360
AWS CDKにおける「再利用性」を考える / aws-cdk-reusability
gotok365
6
1.3k
TiDB Serverless ~理想のServerless DBを考える~
soso_15315
1
160
Terraformテスト入門
msato
0
540
Cloudflare Workers x AWS Lambdaの組み合わせユースケース / Cloudflare Workers x AWS Lambda Combination Use Case
seike460
PRO
2
310
SRE チーム立ち上げ前に考えたこと・取り組んだこと / Considerations and Preparations Before Establishing an SRE Team
mackey0225
3
320
みんなのオブザーバビリティプラットフォームを作ってるんだがパフォーマンスがやばい #mackerelio #srenext
ne_sachirou
0
380
CSC307 Lecture 10
javiergs
PRO
0
310
Exploring the Gradually Lost Technical Skills in the Cloud Native Era
hwchiu
2
3.9k
Trial
cairolibrary720
1
130
Featured
See All Featured
A designer walks into a library…
pauljervisheath
201
24k
Gamification - CAS2011
davidbonilla
78
4.9k
The Straight Up "How To Draw Better" Workshop
denniskardys
229
130k
Debugging Ruby Performance
tmm1
71
11k
RailsConf 2023
tenderlove
16
720
What’s in a name? Adding method to the madness
productmarketing
PRO
21
2.9k
Visualization
eitanlees
139
14k
Designing with Data
zakiwarfel
96
5k
Scaling GitHub
holman
458
140k
Rebuilding a faster, lazier Slack
samanthasiow
78
8.5k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
24
1.8k
From Idea to $5000 a Month in 5 Months
shpigford
377
46k
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