swiftmacosnstabview

One view controller per NSTabViewItem in Swift


I am writing an application for mac OSX in swift and I would like to separate the code clearly so I am looking for a way to have a view controller for each NSTabViewItem in a NSTabView without use the Tab View Controller. Is it possible ?


Solution

  • Finally, I found a solution. It’s possible to do that with a “Container view”. I put a Container View in a view. I created a new view controller. Finally, I linked both with Ctrl-Drag from container view to the new view controller and selected "embed". More information in this tutorial