Guest User

Untitled

a guest
Jul 22nd, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. // works fine
  2. CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"opacity"];
  3. NSNumber *value = [NSNumber numberWithFloat:0.0];
  4.  
  5. animation.duration = 3.0;
  6. animation.fromValue = [NSNumber numberWithFloat:1.0];
  7. animation.toValue = value;
  8.  
  9. [layer addAnimation:animation forKey:@"opacity"];
  10. [layer setValue:value forKey:@"opacity"];
Add Comment
Please, Sign In to add comment