I'm trying my hand at developing an OSX app. Xcode and Swift are all new to me.
The defaults are all very good at modifying objects when the user changes the window size, but not so good at changing the window size when objects in the view change.
I've seen a couple of examples of recalculating the origin and frame size - I think the math part of it will be straight forward. However, I cannot get a working reference to the NSWindow object. click-drag will not deposit an IBOutlet for the window in any of the .swift files (AppDelegate, ViewController, custom). And typing it in doesn't bind it.
A simplified example of what I am trying to accomplish: Based on user input, change the content of the display, and adjust the window size to encompass the newly modified display. On my main storyboard - Window Controller, segued to - View Controller, containing a Horizontal Slider and a Container view. The container view is segued to - Horizontal Split View Controller, segued to - three repetitive instances of a View Controller.
When the user changes the slider bar, one or more of the three bottom most view controllers will be hidden/unhidden.
The attached pictures show the behavior I am looking for.
Imagine where the text "small group" is, there is a collection of drop down boxes, text boxes, radio buttons, etc.




NSWindowControllersubclasses to own those windows if your logic becomes complicated enough. This still works today, if you uncheck "use storyboards" when creating your project. - Nicolas Miari