Re: NSScrollView in NSTabView autolayout problem
Re: NSScrollView in NSTabView autolayout problem
- Subject: Re: NSScrollView in NSTabView autolayout problem
- From: Chuck Soper <email@hidden>
- Date: Thu, 18 Apr 2013 09:37:52 -0700
- Thread-topic: NSScrollView in NSTabView autolayout problem
This message may be relevant for your issue:
http://prod.lists.apple.com/archives/cocoa-dev/2013/Feb/msg00426.html
Personally, I don't use auto layout in NSScrollView. I think that
NSScrollView doesn't support it, but it appears that many people have
gotten it to work.
Chuck
P.S. It looks like your message was sent to the list on Saturday, but I
didn't receive it until this morning.
On 4/13/13 1:57 PM, "email@hidden" <email@hidden> wrote:
>Hi
>I have an NSTabView with multiple tabs, each containing an NSScrollView.
>In the scrollviews I dynamically place custom views which are sized using
>autolayout and constraints.
>
>Now if I add my custom views to a scrollview in tab1 and resize the
>window with this tab active everything works fine and autolayout does not
>complain.
>
>On the other hand, if I add my custom views to a scrollview in tab1,
>switch to another tab, resize the window, and switch back to tab1
>autolayout breaks with the following exemplar message:
>
>Unable to simultaneously satisfy constraints: (
>"<NSAutoresizingMaskLayoutConstraint:0x4011d8f60 h=-&- v=-&-
>H:|-(0)-[FlippedDocumentView:0x4011b76e0] (Names:
>'|':NSClipView:0x40120eb80 )>", "<NSLayoutConstraint:0x4012a5c80
>H:|-(10)-[TextViewModuleView:0x401236e80] (Names:
>'|':FlippedDocumentView:0x4011b76e0 )>", "<NSLayoutConstraint:0x4011148e0
>H:[TextViewModuleView:0x401236e80]-(10)-| (Names:
>'|':FlippedDocumentView:0x4011b76e0 )>",
>"<NSAutoresizingMaskLayoutConstraint:0x4011d8f00 h=-&- v=-&-
>H:[FlippedDocumentView:0x4011b76e0]-(0)-| (Names:
>'|':NSClipView:0x40120eb80 )>",
>"<NSAutoresizingMaskLayoutConstraint:0x4011d5e00 h=--& v=--&
>H:[NSClipView:0x40120eb80(0)]>" )
>
>
>What I noticed in the message is this "H:[NSClipView:0x40120eb80(0)]".
>How come the NSClipView so in fact contentView of the scrollview has
>width = 0?
>My question is, why does the autolayout work fine for the active tab and
>does for inactive?
>
>Thanks
>
>k.
>_______________________________________________
>
>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