i create an array of 2 images, animate then and everything work perfectly. but now i want the animation to stop after one repeat, i mean that the animation will start with the first image, move to second one and stop (and the second image will stay on my imageview). how can i do it?
here is my code:
UIImage *mistakeOne = [UIImage imageNamed:@"Xmark.png"];
UIImage *mistakeOneB = [UIImage imageNamed:@"XmarkWhite.png"];
NSMutableArray *animation = [[NSMutableArray alloc] initWithObjects:mistakeOne, mistakeOneB , nil];
[mistakeNumberOne setAnimationImages:animation];
mistakeNumberOne.animationDuration = 5.0;
[mistakeNumberOne startAnimating]
thanks!
Assuming mistakeNumberOne is a
UIImageViewIf you want to keep an image after the animation set the desired image in the UIImageview before the animation:
After the animation it will show the image.
Putting it all together: