Quote:
Originally Posted by Samalope
Hello,
I am pretty new to programming on iphone and have gotten stuck with something. I am trying to select a random picture from my array. Also, I only know how to make my array show as an animation and i was wondering how to make it so it just shows the image in the image view instead of animating it. I plan on having 300-500 images total. Thanks for any help! My code is attached.
|
I did not look at your code, but It sounds like you're using a UIImageView and setting the animationImages property. If you set myView.animationImages = nil then you can set myView.image = anImage. That will display the single image "anImage".
300 images is a lot, probably too many to load into memory at the same time. Instead, you should probably keep an NSArray of image *filenames* , and when you pick your random number, take that filename and load the image.