// Declare index in Header.h
index=0;
- (IBAction)next {
index++;
// Set imageCount to as many images as are available
int imageCount=2;
if (index<=imageCount) {
NSString* imageName=[NSString stringWithFormat:@"img%i", index];
[picture setImage: [UIImage imageNamed: imageName]];
}
}
Where do I declare index in my header file and how?