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, 04:05 PM   #5 (permalink)
CanadaDev
Registered Member
 
Join Date: Mar 2009
Location: Toronto, ON
Posts: 111
Default

Quote:
Originally Posted by bharath2020 View Post
Where exactly do you invoke setCelllImageURL:?

If its in the tableview delegate method objectforcellatrow.. then i suppose it is the wrong place..
It's invoked in cellForRowAtIndexPath: in my tableviewcontroller class.

Quote:
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..
Okay, I'll look into this. Find it odd there's no code available that already has all this stuff setup. I mean it's a pretty common thing, and a lot of apps use it. Haven't found a complete code only small pieces here and there.
CanadaDev is offline   Reply With Quote
 

» Advertisements
» Online Users: 748
18 members and 730 guests
ADY, AppleSteve, betterlee, blueskysinger, ckgni, Domele, femenina, hasinthajanaka, ilmman, jkigel, k2c, Oral B, prerna chavan, sacha1996, saqibjaan, shairah27, zamoraalex2696, zom888
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,619
Threads: 89,141
Posts: 380,328
Top Poster: BrianSlick (7,110)
Welcome to our newest member, femenina
Powered by vBadvanced CMPS v3.1.0

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