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
140
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
190
Activity View Controller (CocoaHeads Lyon octobre 2013)
vtourraine
0
100
Other Decks in Programming
See All in Programming
Hanami and htmx
bkuhlmann
0
210
VSCodeでのDatabricks開発もお勧めしたい/I would also recommend Databricks development with VSCode.
kazumain
0
260
TCAとKMPを用いた新規動画配信アプリ 「ABEMA Live」の設計
tomu28
1
110
Ruby GitHub Packages
bkuhlmann
0
630
Code Reviews
bkuhlmann
4
890
Anthropic Cookbook のおすすめレシピ
schroneko
7
980
What We Can Learn From OSS
inouehi
0
420
コーンフレークから始める モデリング会話入門
ogurotakayuki
0
370
FigmaとPHPで作る1ミリたりとも表示崩れしない最強の帳票印刷ソリューション
ttskch
43
19k
障害対応を起点としたもっといい開発と運用のサイクル作りのためにできること / Hatena Enginner Seminar #29
polamjag
0
180
SIMD Parallel Programming with the Vector API
josepaumard
0
180
1BRC--Nerd Sniping the Java Community
gunnarmorling
0
340
Featured
See All Featured
Designing on Purpose - Digital PM Summit 2013
jponch
110
6.5k
Raft: Consensus for Rubyists
vanstee
132
6.3k
Building a Modern Day E-commerce SEO Strategy
aleyda
17
6.4k
RailsConf 2023
tenderlove
4
540
Dealing with People You Can't Stand - Big Design 2015
cassininazir
357
22k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
116
18k
We Have a Design System, Now What?
morganepeng
43
6.8k
What's new in Ruby 2.0
geeforr
337
31k
Code Review Best Practice
trishagee
55
15k
Designing with Data
zakiwarfel
96
4.8k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
2
3.4k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
659
120k
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