Re: Problem using NSView's scrollRect:by:
Re: Problem using NSView's scrollRect:by:
- Subject: Re: Problem using NSView's scrollRect:by:
- From: Quincey Morris <email@hidden>
- Date: Wed, 25 Jan 2017 15:40:42 -0800
- Feedback-id: 167118m:167118agrif8a:167118sSoNGoXtsO:SMTPCORP
On Jan 25, 2017, at 14:13 , Tae Won Ha <email@hidden> wrote:
>
> What I expected was that the red box at the bottom left corner gets
> 'copied' to the point (100, 100) when I invoke the triggerScroll action.
> However nothing happens. What am I doing wrong?
At the very least, you aren’t doing what the scroll(rect:by:)) method description tells you to do:
developer.apple.com/reference/appkit/nsview/1483497-scroll <http://developer.apple.com/reference/appkit/nsview/1483497-scroll>
You also need to change the view’s origin to reflect the scroll, and you need to use one of the “needsDisplay” methods to indicate the area(s) invalidated by the scroll.
Is there anything to discuss about why you “cannot use” NSScrollView? The existing functionality would make life a lot easier for you.
_______________________________________________
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