I want to display a .gif (so like automatically playing video), therefore I found out I need to use an array of UIImages
. Now, I have a video containing 96 images, so I would like to use a loop for naming them. Is that possible?
I tried the following, which does unfortunatly not work:
for (int i = 0; i<97; i++) {
[UIImage imageNamed:@"%d", i];
}
So what I want to do with the loop is something like this:
NSArray *myArray = [NSArray arrayWithObjects:
for (int i = 0; i<97; i++) {
[UIImage imageNamed:[NSString stringWithFormat:@"%d",i]];
}
, nil];
So is there a way using for-loops in an array? Some ideas?