Custom transitions
Untitled Kingdom Ltd

Leszek Kaczor
Przebieg prezentacji
•

Nowe metody do tworzenia animacji
• spring animations
• keyframe animations

•

Przejścia pomiędzy...
Animacje
•

Podstawowa metoda tworzenia animacji:
[UIView beginAnimations:nil context:NULL];

[UIView setAnimationDuration...
Animacje
•

Spring animations
+ (void)animateWithDuration:(NSTimeInterval)duration 

delay:(NSTimeInterval)delay

usingSpr...
Animacje
•

Keyframe animations
+ (void)animateKeyframesWithDuration:(NSTimeInterval)duration 

delay:(NSTimeInterval)dela...
Code
Custom transitions
UINavigationControllerDelegate
- (id <UIViewControllerAnimatedTransitioning>)

navigationController:(UI...
Custom transitions
UIViewControllerAnimatedTransitioning
- (NSTimeInterval)transitionDuration:(id


<UIViewControllerConte...
Interactive transitions
UINavigationControllerDelegate
- (id<UIViewControllerInteractiveTransitioning>)navigationControlle...
Interactive transitions
•

UIViewControllerInteractiveTransitioning
- (void)startInteractiveTransition:(id


<UIViewContro...
Code
Podsumowanie
•

Proste i intuicyjne API

•

Nowe metody do tworzenia animacji

•

Interaktywne przejścia pomiędzy widokami
Custom Transitions in iOS7 by Leszek Kaczor
Upcoming SlideShare
Loading in …5
×

Custom Transitions in iOS7 by Leszek Kaczor

723 views

Published on

Custom Transitions by Leszek Kaczor during the Untitled Kingdom Event in Pauza In Garden/ Kraków, Poland

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
723
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
7
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Custom Transitions in iOS7 by Leszek Kaczor

  1. 1. Custom transitions Untitled Kingdom Ltd
 Leszek Kaczor
  2. 2. Przebieg prezentacji • Nowe metody do tworzenia animacji • spring animations • keyframe animations • Przejścia pomiędzy widokami • animacyjne (custom transitions) • interaktywne (interactive transitions)
  3. 3. Animacje • Podstawowa metoda tworzenia animacji: [UIView beginAnimations:nil context:NULL];
 [UIView setAnimationDuration:2.0f];
 [UIView setAnimationDelegate:self];
 [UIView setAnimationDidStopSelector:@selector(fadeIn:finished:context:)];
 [view setAlpha:0.0f];
 [UIView commitAnimations]; ! • Od wersji iOS4: + (void)animateWithDuration:(NSTimeInterval)duration 
 delay:(NSTimeInterval)delay 
 options:(UIViewAnimationOptions)options 
 animations:(void (^)(void))animations 
 completion:(void (^)(BOOL finished))completion
  4. 4. Animacje • Spring animations + (void)animateWithDuration:(NSTimeInterval)duration 
 delay:(NSTimeInterval)delay
 usingSpringWithDamping:(CGFloat)dampingRatio 
 initialSpringVelocity:(CGFloat)velocity 
 options:(UIViewAnimationOptions)options 
 animations:(void (^)(void))animations 
 completion:(void (^)(BOOL finished))completion
  5. 5. Animacje • Keyframe animations + (void)animateKeyframesWithDuration:(NSTimeInterval)duration 
 delay:(NSTimeInterval)delay 
 options:(UIViewKeyframeAnimationOptions)options 
 animations:(void (^)(void))animations 
 completion:(void (^)(BOOL finished))completion;! + (void)addKeyframeWithRelativeStartTime:(double)frameStartTime 
 relativeDuration:(double)frameDuration 
 animations:(void (^)(void))animations;
  6. 6. Code
  7. 7. Custom transitions UINavigationControllerDelegate - (id <UIViewControllerAnimatedTransitioning>)
 navigationController:(UINavigationController *)navigationController
 animationControllerForOperation:(UINavigationControllerOperation)operation
 fromViewController:(UIViewController *)fromVC
 toViewController:(UIViewController *)toVC
  8. 8. Custom transitions UIViewControllerAnimatedTransitioning - (NSTimeInterval)transitionDuration:(id 
 <UIViewControllerContextTransitioning>)transitionContext - (void)animateTransition:(id 
 <UIViewControllerContextTransitioning>)transitionContext
  9. 9. Interactive transitions UINavigationControllerDelegate - (id<UIViewControllerInteractiveTransitioning>)navigationController:
 (UINavigationController *)navigationController
 interactionControllerForAnimationController:
 (id<UIViewControllerAnimatedTransitioning>)animationController
  10. 10. Interactive transitions • UIViewControllerInteractiveTransitioning - (void)startInteractiveTransition:(id 
 <UIViewControllerContextTransitioning>)transitionContext • UIPercentDrivenInteractiveTransition - (void)updateInteractiveTransition:(CGFloat)percentComplete; - (void)cancelInteractiveTransition; - (void)finishInteractiveTransition;
  11. 11. Code
  12. 12. Podsumowanie • Proste i intuicyjne API • Nowe metody do tworzenia animacji • Interaktywne przejścia pomiędzy widokami

×