开发者

UIScrollView performance issues

开发者 https://www.devze.com 2023-03-09 19:44 出处:网络
I am bundling up 2000 - 5000 images in uiscrollview with names. The current scrollview has quite hiccups during scrolling.

I am bundling up 2000 - 5000 images in uiscrollview with names. The current scrollview has quite hiccups during scrolling.

So the question is about how to improve performance. What I have searched so far is that I would have to get on NSOperations, NSQueue like things. But I'm not able to get any code sample on that. I remembered watching some video on WWDC 2010 on boosting 开发者_如何转开发performance of UItableview loading images being exhibited. Unfortunately I'm not able to remember that title too (worst perhaps it was 2009 video session).

So please can anyone point to me in right direction about what tutorial or sample code should I see. Atleast apple ios library reference links?


UITableView uses lazy loading of reusable cells from a pool.

I'd advise you look at implementing something like this, so that only images objects that are actually viewed fetch an image.

NSOperations may be something you could look at to implement the actual fetch with but also consider using ASIHTTPRequest to asynchronously grab them as this handles all the queuing and threading for you.

0

精彩评论

暂无评论...
验证码 换一张
取 消