NSScrollView in NSTabView autolayout problem
NSScrollView in NSTabView autolayout problem
- Subject: NSScrollView in NSTabView autolayout problem
- From: "email@hidden" <email@hidden>
- Date: Sat, 13 Apr 2013 21:57:10 +0100
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