Posted By

BenClayton on 04/04/11


Tagged


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

athanhcong
cnathan


iOS / iPhone: Continuously looping block-based UIView animation


 / Published in: Objective C
 

Use the UIViewAnimationOptionRepeat and UIViewAnimationOptionAutoreverse options.

  1. [UIView animateWithDuration:0.5 delay:0 options:(UIViewAnimationCurveLinear | UIViewAnimationOptionAutoreverse | UIViewAnimationOptionRepeat) animations:^{
  2.  
  3. [startButton setTransform:CGAffineTransformMakeScale(1.5, 1.5)];
  4. startButton.alpha = 0.6;
  5.  
  6. } completion:nil];

Report this snippet  

You need to login to post a comment.