Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Draw This
($0.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 07-08-2009, 12:58 PM   #2 (permalink)
smasher
Registered Member
iPhone Dev SDK Supporter
 
smasher's Avatar
 
Join Date: Jul 2008
Location: San Mateo, CA (San Fran)
Posts: 3,858
smasher will become famous soon enough
Default

Quote:
Originally Posted by Samalope View Post
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.
__________________

Free Games!
smasher is offline   Reply With Quote
 

» Advertisements
» Online Users: 604
22 members and 582 guests
Alexj17, baja_yu, chenpo, chiataytuday, dapis, Dogtown, Domele, givensur, GVD, hemcii, iAppDev, jerrywenwu, LooN3y, michaelhansen, nanijoe, Punkjumper, Rudy, Shiroboi, smith288, yuonneru49
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 174,543
Threads: 93,725
Posts: 401,261
Top Poster: BrianSlick (7,954)
Welcome to our newest member, jerrywenwu
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 09:16 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.