Re: Coverflow like background drawing?
Re: Coverflow like background drawing?
- Subject: Re: Coverflow like background drawing?
- From: Kyle Sluder <email@hidden>
- Date: Sun, 25 Jan 2009 03:31:53 -0500
On Sat, Jan 24, 2009 at 7:10 PM, Alex Kac <email@hidden> wrote:
> UIKit/AppKit are not thread-safe meaning we should never do drawing on a
> background thread. Yet, if we have say 5 views and for performance reasons
> we want the main view to draw first and then the other 4 to draw in the
> background like how CoverFlow will draw its icons/images seemingly in the
> background, how does one do that?
1) Are you sure you want to use separate views for each item in your
CoverFlow-esque interface? You could use layers or cells.
2) Perform all your loading and rendering into an offscreen image and
then use performSelectorOnMainThread: to schedule the drawing for the
next runloop iteration. You get all the benefits of multithreading
the I/O bound portion of your code. Yes, you still have to do the
pixel-pushing on the main thread but that's an artifact of the
architecture.
--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