Re: NSScrollView showing part of view with white space above
Re: NSScrollView showing part of view with white space above
- Subject: Re: NSScrollView showing part of view with white space above
- From: Quincey Morris via Cocoa-dev <email@hidden>
- Date: Sun, 13 Oct 2019 08:35:15 -0700
On Oct 13, 2019, at 06:30 , Aandi Inston via Cocoa-dev
<email@hidden> wrote:
>
> If the NSScrollView is scrolled upwards, the content in the window moves down
> (as normal). What we now see is a large white space at the top of the
> NSScrollView, and below that the same view portion we first saw.
It sounds like your NSView actually has white space at the top.
However, IB historically has a problem where its knowledge of the NSScrollView,
the NSClipView and the client view gets messed up, and it mis-positions things
rather than enforcing the correct relative positioning.
I think you have to start by logging the bounds of all three views (don’t
forget the NSClipView!), but make sure you convert all of their coordinates to
a *common* coordinate system (such as window coordinates), otherwise it can be
too hard to compare them. Do this once initially, then again after you’ve
scrolled all the way to the top.
You also haven’t mentioned whether your view is using auto-layout. Your view
may be resizing to meet some auto-layout constraints, dumping all of your
subviews at the bottom.
_______________________________________________
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