Advertisement
Guest User

Untitled

a guest
Nov 30th, 2015
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. CABasicAnimation *cornerAnim = [CABasicAnimation animationWithKeyPath:@"cornerRadius"];
  2. cornerAnim.fromValue = @(0.f);
  3. cornerAnim.toValue = @(50.f);
  4. cornerAnim.duration = 0.5f;
  5. [self.redView.layer addAnimation:cornerAnim forKey:@"cornerRadius"];
  6.  
  7. self.redView.layer.cornerRadius = 50.f;
  8.  
  9. [UIView animateWithDuration:1.0f animations:^{
  10. self.redView.transform = CGAffineTransformMakeRotation(M_PI);
  11. }];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement