On Aug 6, 2013, at 9:00 AM, Steve Mills <smi...@makemusic.com> wrote:

> On Aug 5, 2013, at 12:34:11, Kyle Sluder <k...@ksluder.com> 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 (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to