Skip to content

Instantly share code, notes, and snippets.

@kyleturner
Created January 13, 2012 04:55
Show Gist options
  • Save kyleturner/1604743 to your computer and use it in GitHub Desktop.
Save kyleturner/1604743 to your computer and use it in GitHub Desktop.
360 Degree Rotation Animation
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