Re: Smooth adjustScroll of NSScrollView
Re: Smooth adjustScroll of NSScrollView
- Subject: Re: Smooth adjustScroll of NSScrollView
- From: Charles Constant <email@hidden>
- Date: Tue, 27 Oct 2015 21:59:53 -0700
- X_v_e_cd: b9c8b9915dc1a22e951e8bef4484b473
- X_v_r_cd: fadf49269dc8149e48b7a1b4de5395c2
I don't know if this information can solve your issue directly, but I used
it to fix my issue last week. I have a custom NSScroller that had jerky
scrolling. I didn't realize that views have an ".animator()" proxy that you
can use instead.
NSAnimationContext.beginGrouping()
NSAnimationContext.currentContext().duration = seconds
clipview.animator().setBoundsOrigin( clipview_pt )
NSAnimationContext.endGrouping()
Probably common knowledge, but I haven't done heaps of animations in Cocoa.
So, by setting my clipview bounds using the animator it glides to the
correct point. Hope it's relevant for your project.
On Tue, Oct 27, 2015 at 9:33 AM, Jens Alfke <email@hidden> wrote:
> I’m guessing they wait for the scrolling to finish [not sure how, maybe
> just polling the scroll position], then use Core Animation to set the
> scroll position to the nearest grid-line.
>
> —Jens
> _______________________________________________
>
> 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
>
_______________________________________________
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