Skip to content

Instantly share code, notes, and snippets.

@kjkasi
Created November 30, 2015 16:07
Show Gist options
  • Save kjkasi/2e22b9693eaf971c95dc to your computer and use it in GitHub Desktop.
Save kjkasi/2e22b9693eaf971c95dc to your computer and use it in GitHub Desktop.
CABasicAnimation *cornerAnim = [CABasicAnimation animationWithKeyPath:@"cornerRadius"];
cornerAnim.fromValue = @(0.f);
cornerAnim.toValue = @(50.f);
cornerAnim.duration = 0.5f;
[self.redView.layer addAnimation:cornerAnim forKey:@"cornerRadius"];
self.redView.layer.cornerRadius = 50.f;
[UIView animateWithDuration:1.0f animations:^{
self.redView.transform = CGAffineTransformMakeRotation(M_PI);
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment