I have a set of images named 0.png, 1.png, 2.png, etc...
Say I only have five. I want to use an integer variable (infoInt) to determine what image is displayed. Since I'm naming the images in numbers, I though I could define the image as what ever the integer was. i.e. infoInt.png (as infoInt changes). I'm not sure how I can approach it. Here is my attempt.
- (void)viewDidLoad{
[super viewDidLoad];
UIImage *img;
for (infoInt =0; infoInt<=5; infoInt++) {
img = [UIImage imageNamed:infoInt".png"]; //What to do here? How do I use infoInt variable in image name?
[imageView setImage:img];
}