Guest User

Untitled

a guest
Jul 22nd, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. // doesn't snap back, doesn't respect the animation
  2. CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"transform.scale"];
  3. NSValue *value = [NSNumber numberWithFloat:1.5];
  4.  
  5. animation.duration = 3.0;
  6. animation.fromValue = [NSNumber numberWithInt:1.0];
  7. animation.toValue = value;
  8.  
  9. [layer addAnimation:animation forKey:@"transform.scale"];
  10. [layer setValue:value forKeyPath:@"transform.scale"];
Add Comment
Please, Sign In to add comment