Re: 10.8 copiesOnScroll, -setNeedsDisplayInRect: ignored during scrolling
Re: 10.8 copiesOnScroll, -setNeedsDisplayInRect: ignored during scrolling
- Subject: Re: 10.8 copiesOnScroll, -setNeedsDisplayInRect: ignored during scrolling
- From: Dave Keck <email@hidden>
- Date: Mon, 06 Aug 2012 14:34:14 -1000
> But Mike is still right; you're probably better served by using -performSelectorOnMainThread::: rather than waking the run loop up yourself.
I tend to disagree -- invoking CFRunLoopPerformBlock() and
CFRunLoopWakeUp() is likely more performant since they're at the CF
level (which -performSelectorOnMainThread eventually calls into), and
a block-based API is more convenient. Furthermore,
-performSelectorOnMainThread: wakes up the target run loop anyway by
invoking CFRunLoopWakeUp().
> Given that it's a private mode, I'm not sure you really want your code executing during the scroll event coalescing mode.
Agreed -- I wasn't using nor advocating NSScrollEventCoallescing.
(Also note that calling CFRunLoopWakeUp() on the main thread while
it's running in the NSScrollEventCoallescing mode won't cause it to
execute the block passed to CFRunLoopPerformBlock(...,
kCFRunLoopDefaultMode, ...) until the run loop is again running in the
default mode.)
_______________________________________________
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