Re: NSOperation and lazy loading
Re: NSOperation and lazy loading
- Subject: Re: NSOperation and lazy loading
- From: Kyle Sluder <email@hidden>
- Date: Mon, 14 Sep 2009 21:28:46 -0700
Make your Person class KVO-compliant for the image property. If the
object has not yet downloaded and cached it's image, have its -image
method return a generic placeholder image (or nil) and start a
background fetch. When the download is complete, have it call -
setImage: on the Person for whom it was requested.
Now anyone who is a registered KVO observer of that object's image
property will be notified when the download is complete.
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden