hi,
I have an image that is animating, until you press the button that says "Stop". The code works and all, but the image returns to the first image in the array. How can i add a code to tell it to stop at the image it's currently at?
- (void)viewDidLoad {
[super viewDidLoad];
imageView.animationImages = [NSArray arrayWithObjects:
[UIImage imageNamed:@"a0001.png"],
[UIImage imageNamed:@"a0002.png"],
[UIImage imageNamed:@"a0003.png"],
[UIImage imageNamed:@"a0004.png"],
[UIImage imageNamed:@"a0005.png"], nil];
imageView.animationDuration = 3.00;
imageView.animationRepeatCount = 0;
[imageView startAnimating];
[self.view addSubview:imageView];
}
- (IBAction)stopAni {
[imageView stopAnimating];
}
Thanks