• 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: Any way to delay drawing after scrolling?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Any way to delay drawing after scrolling?


  • Subject: Re: Any way to delay drawing after scrolling?
  • From: Kyle Sluder <email@hidden>
  • Date: Tue, 06 Aug 2013 09:09:51 -0700

On Aug 6, 2013, at 9:00 AM, Steve Mills <email@hidden> wrote:

> On Aug 5, 2013, at 12:34:11, Kyle Sluder <email@hidden> wrote:
>
>> Try turning off copies-on-scroll on your scroll view.
>
> That seems to do the trick. Thanks. I'm grabbing its state, turning it off, scrollPoint, then setting it back.

If scrolling your view always requires a redraw, I’d just turn it on in the nib and leave it on.

Also, since we now know how copiesOnScroll affects things: are you sure you were seeing double drawing? The way it's supposed to work is that the scrolling methods call -scrollRect:by: to blit your contents into the new position, then you get -setNeedsDisplay: in the newly-exposed rects.

However you are noticing that you have scrolled, you are presumably calling [self setNeedsDisplay], so you should therefore only actually draw once on the next turn of the display loop. Turning off copiesOnScroll will avoid the unnecessary blit, but if you were actually seeing two -drawRect: calls for every scroll then something else is afoot.

--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: Any way to delay drawing after scrolling?
      • From: Steve Mills <email@hidden>
References: 
 >Any way to delay drawing after scrolling? (From: Steve Mills <email@hidden>)
 >Re: Any way to delay drawing after scrolling? (From: Kyle Sluder <email@hidden>)
 >Re: Any way to delay drawing after scrolling? (From: Steve Mills <email@hidden>)

  • Prev by Date: Re: Thread safety, some basic questions about accessing mutable objects across threads
  • Next by Date: Re: Thread safety, some basic questions about accessing mutable objects across threads
  • Previous by thread: Re: Any way to delay drawing after scrolling?
  • Next by thread: Re: Any way to delay drawing after scrolling?
  • Index(es):
    • Date
    • Thread