Easier way to add lots of images to an array
Posted
by Sam Jarman
on Stack Overflow
See other posts from Stack Overflow
or by Sam Jarman
Published on 2010-04-09T09:48:35Z
Indexed on
2010/04/09
9:53 UTC
Read the original article
Hit count: 263
arrays
|iphone-sdk
Hey Guys
In an effort to 'clean up' my code - I was wondering if this could be made simpler. I have 32 images and I was adding them like this
[theCarPics addObject:[UIImage imageNamed:@"1.jpg"]];
[theCarPics addObject:[UIImage imageNamed:@"2.jpg"]];
//...
[theCarPics addObject:[UIImage imageNamed:@"32.jpg"]];
is there a simpler way? loop perhaps?
Any ideas would be appreciated guys
Thanks
Sam
© Stack Overflow or respective owner