Re: Smooth adjustScroll of NSScrollView
Re: Smooth adjustScroll of NSScrollView
- Subject: Re: Smooth adjustScroll of NSScrollView
- From: Nick <email@hidden>
- Date: Thu, 29 Oct 2015 08:44:01 +0200
- X_v_e_cd: b61a4c32b30ad800ce296b1516dbc286
- X_v_r_cd: fa7ef71db0dcf0d117dd1f21832f9d19
Thanks Jens, Charles!
2015-10-28 6:59 GMT+02:00 Charles Constant <email@hidden>:
> 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