iphone best practice, how to load multiple high quality images
Posted
by
bennythemink
on Stack Overflow
See other posts from Stack Overflow
or by bennythemink
Published on 2011-03-16T00:08:26Z
Indexed on
2011/03/16
0:10 UTC
Read the original article
Hit count: 171
Hi guys and girls,
I have about 20-ish high quality images (~3840x5800 px) that I need to load in a simple gallery type app. The user clicks a button and the next image is loaded into the UIImageView.
I currently use [UIImage imageWithContentsOfFile:] which takes about 6 seconds to load each image in the simulator :(
if I use [UIImage imageNamed:] it takes even longer to load but caches the images which means its quicker if the user wishes to see the same images again. But it may cause memory problems later with all that caching crashing my app.
I want to know whats the best practice for loading these? I'm experimenting with reducing image file size as much as is possible but I really need them to be high quality image for the purpose of the app (zoomable, etc.).
Thanks for any advice
© Stack Overflow or respective owner