Hi list,
I am implementing a custom NSView which displays pdf files and the
like. I am not/can not use
NSScrollView.
I would like to implement intertial scrolling (when using trackpad)
like in Preview or Safari.
So far I am receiving scrollWheel events on the NSView and doing something like:
- (void)scrollWheel:(NSEvent *)event
{
CGFloat deltaY = -[event scrollingDeltaY];
if ([event hasPreciseScrollingDeltas]) {
if (fabs (deltaY) > 0) {
[connector scrollBy:deltaY]; // performs scrolling of deltaY points
}
}
This works to a first approximation. However the intertial scrolling
seems to be quite "laggy" when
2-finger swiping at *slow* speeds. Also, when changing direction of
scrolling/swiping quickly the
scrolling in one direction continues for a bit before changing direction.
In Preview when one changes the direction of scrolling this occurs
immediately without any lag.
Does anybody have any ideas of where I should be looking to fix this ?
Any suggestion appreciated.
Thanks!
Cheers,
Nicolas
_______________________________________________
Cocoa-dev mailing list ([email protected])
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 [email protected]