Re: Any way to delay drawing after scrolling?
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