I have to put a lot of images (>100) to a UIView, with touch detection. If I use UIImageViewController I have ran out of memory. I've tried to draw the images manually, but in that case I can't detect which image has been p开发者_StackOverflowushed.
So how would you do this?
For a simple solution, you might want to try creating thumbnail sized images to display that will take up much less memory (100 times 32 pixels x 32 pixels x 4 channels is definitely small enough for the iPhone to handle). For a more robust solution, you want to look at doing lazy loading and only keep in memory those images that are currently being displayed. There is a great example of this in a CoverFlow clone found in Ch 12 of iPhone SDK Application Development, which you can see here
精彩评论