Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Animation & Interaction Design

Animation & Interaction Design

Why do we put animations into our apps? This talk goes through the principals of animation and interaction design. Discover when animations are appropriate and examine the animations in the app Facebook Pop for a real world example.

Ryan Nystrom

August 25, 2014
Tweet

More Decks by Ryan Nystrom

Other Decks in Programming

Transcript

  1. Write your own! - (void)calculateKeyFramesWithEvaluationObject:(NSObject<evaluate> *)evaluationObject startValue:(double)startValue endValue:(double)endValue interstitialSteps:(NSUInteger)steps {

    NSUInteger count = steps + 2; NSMutableArray *valueArray = [NSMutableArray arrayWithCapacity:count]; double progress = 0.0; double increment = 1.0 / (double)(count - 1); NSUInteger i; for (i = 0; i < count; i++) { double value = startValue + [evaluationObject evaluateAt:progress] * (endValue - startValue); [valueArray addObject:[NSNumber numberWithDouble:value]]; progress += increment; } [self setValues:valueArray]; }
  2. Apple HIG Beautiful, subtle animation pervades the iOS UI and

    makes the app experience more engaging and dynamic. Appropriate animation can: 4 Communicate status and provide feedback 4 Enhance the sense of direct manipulation 4 Help people visualize the results of their actions
  3. Springs pre-iOS 7 [UIView animateWithDuration:0.2 animations:^{ view.frame = wayPastFrame; }

    completion:^(BOOL finished) { [UIView animateWithDuration:0.2 animations:^{ view.frame = backABitFrame; } completion:^(BOOL finished) { [UIView animateWithDuration:0.2 animations:^{ view.frame = finalFrame; }]; }]; }];
  4. Springs iOS 7 [UIView animateWithDuration:0.5 delay:0 usingSpringWithDamping:0.5 // 0.0-1.0 initialSpringVelocity:0.5

    // 0.0-1.0 options:kNilOptions animations:^{ view.frame = frame; } completion:nil];
  5. Springs with Pop POPSpringAnimation *spring = [POPSpringAnimation animationWithPropertyNamed:kPOPViewFrame]; spring.toValue =

    [NSValue valueWithCGRect:frame]; spring.springBounciness = 15; spring.springSpeed = 20; [view pop_addAnimation:spring forKey:@"spring"];
  6. Summing Up 4 Follow animation principals 4 Know why you

    are animating your interface 4 Animate transitions 4 Maintain context throughout your app 4 Prototype however you like 4 Facebook Pop