iOS / iPhone: Continuously looping block-based UIView animation

/ Published in: Objective C
Save to your folder(s)

Use the UIViewAnimationOptionRepeat and UIViewAnimationOptionAutoreverse options.

Copy this code and paste it in your HTML
  1. [UIView animateWithDuration:0.5 delay:0 options:(UIViewAnimationCurveLinear | UIViewAnimationOptionAutoreverse | UIViewAnimationOptionRepeat) animations:^{
  3. [startButton setTransform:CGAffineTransformMakeScale(1.5, 1.5)];
  4. startButton.alpha = 0.6;
  6. } completion:nil];

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.