Re: Help: NSScrollView is resizing its documentView down to (0, 0)
Re: Help: NSScrollView is resizing its documentView down to (0, 0)
- Subject: Re: Help: NSScrollView is resizing its documentView down to (0, 0)
- From: Uli Kusterer <email@hidden>
- Date: Wed, 06 May 2015 17:36:53 +0200
On 05 May 2015, at 18:26, Jens Alfke <email@hidden> wrote:
> I haven't done much AppKit work in a while. Right now I have a small app where I'm trying to do something very simple: put a custom NSView in a window and make it scrollable. The view determines its own frame size based on the content it needs to display. So all I did was create a new window in IB, add an instance of my view, embed it in an NSScrollView, and set up default constraints for the scroll view so it'll track the window size.
So you're not setting a constraint on the *document* view? How do you expect it to know how to constrain that view otherwise? Have you tried doing that? IIRC you need to implement updateConstraints to create proper constraints, or intrinsicContentSize, or maybe both.
_______________________________________________
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