Hi,
I have a UIImageView *picture
and a UIButton *next
and an - (IBAction)next { }
I want to change the image on the view but only if the image equals... for example img1
But using the same button I want to also be able to change the picture if the image = img2 but to a different image (img3)
So far I have this code but it gives me errors please could you help:
Code:
- (IBAction)next {
if (picture UIImage = imageNamed:@"img01.jpg") {
[picture setImage: [UIImage imageNamed:@"img02.jpg"
}
if (picture UIImage = imageNamed:@"img02.jpg") {
[picture setImage: [UIImage imageNamed:@"img03.jpg"
}
}
Please help
Thanks,
Will