On Mar 16, 2016, at 11:46 AM, Bill Cheeseman < email@hidden> wrote:
On Mar 16, 2016, at 11:22 AM, Ken Thomases < email@hidden> wrote:
On Mar 16, 2016, at 9:12 AM, Bill Cheeseman <email@hidden> wrote:
"2016-03-15 14:28:14.801 UI Browser[93092:22589120] Failed to set (contentViewController) user defined inspected property on (NSWindow): Unable to install constraint on view. Does the constraint reference something from outside the subtree of the view? That's illegal. constraint:<NSLayoutConstraint:0x608000085910 'NSTabViewController-TabViewLeading' NSTabView:0x100d18d50.leading == NSView:0x600000120c80.leading priority:749> view:<NSView: 0x600000120c80>"
At the very least, you should concentrate on tab views, constraints involving their leading edges, with priority 749. Do you have many tab views in your storyboard?
My storyboard has 3 tab views, 2 of them with 3 tab view items each, and 1 of them with 16 tabless tab view items used to switch between sets of controls depending on the current selection in a table. It is a manageable job to examine all of them. I am using the new NSTabViewController for all 3 tab views, and until this problem arose they were all working as expected.
I found advice online to open the storyboard "as source" in Xcode in order to examine it as an XML file. Very nice. Unfortuately, searching on "749" tells me that NOTHING in the storyboard file has priority 749. How can that be, when the Xcode runtime error message says that there is?
When I mentioned that I use NSTabViewController, I should have added that my storyboard therefore places a Container view in the storyboard for each tab view, which loads the tab view controller via an Embed segue at run time. The auto layout constraints that control the tab view therefore appear as constraints on the Container view in the storyboard. I have examined all of them in XML format, and they look normal.
This leads me to wonder how the constraints are handled during the embedding process at run time. I know from the documentation that the tab view controller's tab view is substituted for the container view. This suggests that new constraints might be attached to the tab view automatically behind my back when the tab view is loaded. If so, could the error message be talking about an automatic constraint that is not actually in the storyboard and over which I have no direct control? If that is the case, then how would I know what to look for in the XML format version of the storyboard? I still believe that I caused this problem by renaming two view controllers and switching them around in the storyboard. But now I suspect that the error message may be misleading me about the nature of the problem.
|