Created
January 13, 2012 04:55
-
-
Save kyleturner/1604743 to your computer and use it in GitHub Desktop.
360 Degree Rotation Animation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CABasicAnimation *fullRotation = [CABasicAnimation animationWithKeyPath:@"transform.rotation"]; | |
fullRotation.fromValue = [NSNumber numberWithFloat:0]; | |
fullRotation.toValue = [NSNumber numberWithFloat:((360*M_PI)/180)]; | |
fullRotation.duration = 6; | |
fullRotation.repeatCount = 1e100f; | |
[myview.layer addAnimation:fullRotation forKey:@"360"]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment