I got an NSArray with 5 pictures. I want to display them one after the other in a loop. My code :
NSArray *tabImage = [[NSArray alloc] init];
tabImage = [[NSArray arrayWithObjects:
[UIImage imageNamed:@"picto_1.png"],
[UIImage imageNamed:@"picto_2.png"],
[UIImage imageNamed:@"picto_3.png"],
[UIImage imageNamed:@"picto_4.png"],
[UIImage imageNamed:@"picto_5.png"],
nil] retain];
int var = 0;
var = indexPath.row;
for (int var = 0; var < 20; var++) {
pictoImage.image = [tabImage objectAtIndex:(var % 5)];
}
I got the same picture all the time.
Thanks for help.
See Question&Answers more detail:os