Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // doesn't snap back, but doesn't respect the duration of the animation
- CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"transform"];
- NSValue *value = [NSValue valueWithCATransform3D:CATransform3DMakeRotation(M_PI, 1.0, 0.0, 0.0)];
- animation.duration = 3.0;
- animation.fromValue = [NSValue valueWithCATransform3D:layer.transform];
- animation.toValue = value;
- [layer addAnimation:animation forKey:@"transform"];
- [layer setValue:value forKey:@"transform"];
Add Comment
Please, Sign In to add comment