Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 06-15-2009, 02:20 PM   #4 (permalink)
bharath2020
iOS / MacOS Developer
 
bharath2020's Avatar
 
Join Date: Oct 2008
Location: Bengaluru
Posts: 150
Default

Where exactly do you invoke setCelllImageURL:?

If its in the tableview delegate method objectforcellatrow.. then i suppose it is the wrong place..


A simple solution is

Create a own ImageCache class (it will be handy in your future projects, as it has helped me a lot)

provide a request method to other classes

Use an queue internally to maintain and process the request,
the request should contain the url, the sender object(object responsible to received the image after loading) and some context info to return back to the caller...


process each request in a separate thread

once the request is processed(i.e. image is loaded) then inform the sender object along with context info

now store the image in the cache (either a mutable dictionary or array) through which you can fetch the image if requested in future..


you can check for the size of total images and keep a constraint on the total size of the cache



(Sender object in your case would be your UITableViewController or the appropriate class)


Hope that explains well..
bharath2020 is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,849
Threads: 89,215
Posts: 380,664
Top Poster: BrianSlick (7,129)
Welcome to our newest member, joeceastham
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 04:45 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.