Auto Layout & NSScrollViews

  • I am hoping someone has run into this problem and has a suggestion or two: I am building an Xcode-like inspector. Each collapsible "pane" is in its own xib and is loaded in the window controller's windowDidLoad. If I load just a single pane, it works beautifully out-of-the-box. If I add a second pane, auto layout bombs with constraint conflicts.

    So I tried to follow advice about working with NSScrollViews and auto layout by using an "adaptor" view. This seems to resolve the conflicts but for some reason the adaptor view always loads with a zero height (even though it is not this way in the nib) and so everything gets squashed into oblivion.

    There is a gotcha, perhaps, and that is that I need all of the subviews of the adaptor view to conform to the width of the clipview's viewable area, so I can't fix the width, but heights are already fixed.

    Anyone know why auto layout squashes everything into a zero height? If I don't set the document view as not resizable in initWithFrame: it squashes the ScrollView too. Bizarre.


    Keary Suska
    Esoteritech, Inc.
    "Demystifying technology for your home or business"
previous month may 2013 next month
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    
Go to today