I am wanting to press a button and alternate between two images with one UIImageView.
Right now when I run it, I press the button, the image changes but will not change back. What do I need to change in this action code to make it alternate?
- (IBAction)Change:(id)sender {
image.image = [UIImage imageNamed:@"car.png"];
}
Try following code :
To Display sequence image on button click.
.hfile :.mfile :in
viewDidLoadinitializecounter = 0Then
And give your image name like
1.png,2.png,3.pngand so on…