ios - Asynchronous image loading in a uitableview -
i'm integrating facebook in application , i'm @ point i'm loading profile pictures of friends of loggedin user. i'm presenting these users in uitableview, in each cell picture , name of friend. i've subclassed uiimageview , when corresponding cell handled in cellforview method, image loaded asynchronously.
however, when scroll , down several times, image flickering, first wrong pictures loaded, displayed short time , right image loaded. think have way stop loading of image when cell outside view.
is there can me problem , give me solution?
thanks in advance!
you consider not reusing cells. could, however, impair performance if have lot of table cells need loaded (e.g., lot of friends). since every cell has own image, flickering won't occur because of cell reusing.
another thing @ file size of images. chances they're bigger size you're showing them at. if there's way smaller version, help, too.
third, can set image view default image in tableview:willdisplaycell:forrowatindexpath
. flickering still occur, default image, looks better if it's else's picture. in fact, think facebook app does.
Comments
Post a Comment