Re: Knowing if a scroll view is being scrolled
Re: Knowing if a scroll view is being scrolled
- Subject: Re: Knowing if a scroll view is being scrolled
- From: Alastair Houghton <email@hidden>
- Date: Thu, 15 Feb 2007 16:48:30 +0000
On 15 Feb 2007, at 16:21, glenn andreas wrote:
On Feb 15, 2007, at 10:13 AM, I. Savant wrote:
On Feb 15, 2007, at 10:53 AM, Alastair Houghton wrote:
It sounds a little complicated, but it isn't, and it's quite a
clean way to do it.
... except that this won't handle page-up/page-down nor scroll
wheel-initiated scrolls ...
Why not just look at the current event - if it is a mouse down,
mouse dragged, scroll wheel, or page-up/page-down key event, do the
"quick and dirty" version.
Well you'd have to be a bit careful about handling redraws you wanted
to do in response to events passed directly to your view, but that
would work, I suppose.
Personally I don't like relying on the ability to query the current
event if only because I think it's hard to foresee circumstances
under which such code might break in the future. I have used it once
or twice myself, but I tend to try to avoid it if possible.
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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