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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Vincent Tourraine
April 10, 2014
Programming
0
160
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
240
Activity View Controller (CocoaHeads Lyon octobre 2013)
vtourraine
0
140
Other Decks in Programming
See All in Programming
ベクトル検索のフィルタを用いた機械学習モデルとの統合 / python-meetup-fukuoka-06-vector-attr
monochromegane
2
420
OTP を自動で入力する裏技
megabitsenmzq
0
100
new(1.26) ← これすき / kamakura.go #8
utgwkk
0
2.3k
Goの型安全性で実現する複数プロダクトの権限管理
ishikawa_pro
2
330
猫の手も借りたい!ので AIエージェント猫を作って社内に放した話 Claude Code × Container Lambda の Slack Bot "DevNeko"
naramomi7
0
260
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
280
maplibre-gl-layers - 地図に移動体たくさん表示したい
kekyo
PRO
0
260
API Platformを活用したPHPによる本格的なWeb API開発 / api-platform-book-intro
ttskch
1
140
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
390
コーディングルールの鮮度を保ちたい / keep-fresh-go-internal-conventions
handlename
0
200
Ruby and LLM Ecosystem 2nd
koic
1
750
守る「だけ」の優しいEMを抜けて、 事業とチームを両方見る視点を身につけた話
maroon8021
3
900
Featured
See All Featured
Color Theory Basics | Prateek | Gurzu
gurzu
0
250
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.3k
My Coaching Mixtape
mlcsv
0
71
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
76
Fireside Chat
paigeccino
42
3.8k
Mobile First: as difficult as doing things right
swwweet
225
10k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.1k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
The Pragmatic Product Professional
lauravandoore
37
7.2k
Building the Perfect Custom Keyboard
takai
2
710
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Unsuck your backbone
ammeep
672
58k
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