Re: Scrolling [SOLVED]
Re: Scrolling [SOLVED]
- Subject: Re: Scrolling [SOLVED]
- From: Quincey Morris <email@hidden>
- Date: Fri, 15 Jan 2010 14:42:56 -0800
On Jan 15, 2010, at 14:19, David Blanton wrote:
> The solution was to override trackKnob and in it set a flag that scrolling was in play. Then in my drawRect I check the flag to do appropriate scrolling. Then in coming back from [super trackKnob] I knw scrolling is done so I can clear the flag;
Does this deal with the case where the view is scrolled with the mouse scroll wheel instead of by dragging the scroller thumb?
If what you really need to know is *that* your view has been scrolled, rather than *how* your view has been scrolled, you can also do it by registering to receive bounds-changed notifications from the scroll view's clip view.
(Well, I think it's the clip view bounds that change. I haven't looked at this recently, and my head always hurts when I try to figure which coordinate system is the one getting changed by the scrolling. Trial and error FTW. :) )
Keep in mind that views don't generate frame- or bounds-changed notifications by default -- you have to tell them to do so.
_______________________________________________
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