uitableview - Loading image from byte array stream in UITableViewCell -


i implementing uitableview custom uitableviewcell. there uiimageview there displaying image. api given , not contain download links of images i'll have show in each uitableviewcell. getting images , i'll need call request returns byte array stream of image shown on corresponding cell.

i know , can make image nsdata coming api. not sure how efficient idea , worrying memory , performance issue. , want asynchronous loading in uitableviewcell , image cacheing take less time in later calls. , can efficient approach here ? , suggestion library can me doing great.

you need download images on own, in table view controller or model. save on memory space, can resize images. ideally, done on server side save on bandwidth. could, however, resize once downloaded well. remember, retina , non-retina devices have different image resizing needs.

either way, cache resized image along other cell data , throw away nsdata. can refresh cell calling reloadrowsatindexpaths:withrowanimation: on uitableview.

if have large number of rows images, can write images disk , free memory. in general though, best avoid hitting disk load cell data in order keep scrolling through table smooth. keep performance up, could, based on table scrolling position, anticipate images needed , intelligently load dump images. need loading on separate thread keep affecting scrolling performance.


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -