• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: 10.8 copiesOnScroll, -setNeedsDisplayInRect: ignored during scrolling
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 10.8 copiesOnScroll, -setNeedsDisplayInRect: ignored during scrolling


  • Subject: Re: 10.8 copiesOnScroll, -setNeedsDisplayInRect: ignored during scrolling
  • From: Kyle Sluder <email@hidden>
  • Date: Sat, 04 Aug 2012 16:57:44 -0700

On Aug 4, 2012, at 4:43 PM, Dave Keck <email@hidden> wrote:

> I'm afraid I sent my question before doing my due diligence though, so
> in the interest of the archives: the reason the invalidated regions
> weren't being redrawn during scrolling was because the block that
> calls -setNeedsDisplayInRect: was scheduled to execute on the main
> thread via dispatch_async(). Due to a change in either NSScrollView,
> NSClipView, or CFRunLoop in 10.8, these blocks are only executed after
> scrolling has stopped. Instead of dispatch_async(), one can use
> CFRunLoopPerformBlock() along with CFRunLoopWakeUp() to have the block
> executed on the main thread during scrolling.

I'm unsure of the wisdom of this approach. Presumably the scroll view is intentionally blocking the runloop, and thus assuming that the runloop will not fire its event sources until after the scrolling is complete. By waking up the runloop, you're violating that assumption and could be causing work the scrollview has enqueued to be performed sooner than expected.

--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

  • Follow-Ups:
    • Re: 10.8 copiesOnScroll, -setNeedsDisplayInRect: ignored during scrolling
      • From: Dave Keck <email@hidden>
References: 
 >10.8 copiesOnScroll, -setNeedsDisplayInRect: ignored during scrolling (From: Dave Keck <email@hidden>)
 >Re: 10.8 copiesOnScroll, -setNeedsDisplayInRect: ignored during scrolling (From: Quincey Morris <email@hidden>)
 >Re: 10.8 copiesOnScroll, -setNeedsDisplayInRect: ignored during scrolling (From: Dave Keck <email@hidden>)

  • Prev by Date: Re: 10.8 copiesOnScroll, -setNeedsDisplayInRect: ignored during scrolling
  • Next by Date: Re: 10.8 copiesOnScroll, -setNeedsDisplayInRect: ignored during scrolling
  • Previous by thread: Re: 10.8 copiesOnScroll, -setNeedsDisplayInRect: ignored during scrolling
  • Next by thread: Re: 10.8 copiesOnScroll, -setNeedsDisplayInRect: ignored during scrolling
  • Index(es):
    • Date
    • Thread