Animation in viewDidLoad
For some reason, my animation only works when executed IBAction
, not through viewDidLoad
. I want these images to start animating as soon as they load view
.
myImageView.animationImages = [NSArray arrayWithObjects:
[UIImage imageNamed:@"image1.png"],
[UIImage imageNamed:@"image2.png"], nil];
[myImageView setAnimationRepeatCount:0];
myImageView.animationDuration = 2;
[myImageView startAnimating];
+3
source to share