UIScrollView and UIImage in it with paging enabled

Posted by Infinity on Stack Overflow See other posts from Stack Overflow or by Infinity
Published on 2010-04-18T12:02:16Z Indexed on 2010/04/18 12:03 UTC
Read the original article Hit count: 640

Filed under:
|

Hello guys!

I need to display 10 - 1000 images on a UIScrollView. Paging is enabled. So every page of the scrollview is an image, it is an uiimage. I can load 10 images to 10 uiimages which stays in the memory, but with 1000 images I have problems on the iPhone or on the iPad. I am trying to unload and then load the images when I am doing scrolling. I every time displays 3 images. The current page image, and the -1 and +1 pages. When I am scrolling I unload the image and then load the next. With this method I have two problems. The scrolling is laggy and if I scroll very fast the images don't appear. Maybe is there any good solution for these problems? Can you suggest me one?

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about iphone-sdk