开发者

How to scroll smoothly with UIImage from url in tableview cell

I try to display UIImage from url in tableview cell but it's not scroll smoothly.

at time to scroll image is not cached and every time it goes to url to display and scroll is stick some while

[cell setProductImage:[UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:[dict_productinfo valueForKey:@"productimage"]]]]]

I make custom cell and pu开发者_开发问答t imageview on that to display image


Try loading your images asynchronously. Your main thread has to wait for each image to be loaded before it can continue to draw your table view.

This might be a litte too complex to explain here so take this sourcecode as a reference

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜