Search code examples
objective-cmacoscocoacustom-viewnsviewcontroller

NSViewController and custom views


So I have this layout. I need to load three views into it, the big view, which is part of the NSWindow. The sidebar view and the bottom view.

I almost managed to do it but cant put my finger onto how to complete the process. I want those views to load on app launch.

What I did was create a class which subclasses nsviewcontroller and create two other classes which subsclass the class i created just now.

then i went to main xib hooked up the NSViewcontroller but it dont load anything.

Slightly desperate here as I spent about 5 hours trying to figure this out. Any links to helpful tutorials would be nice. Or some advice how to do it... I almost got it working but my view want loading in the proper place.

My Layout


Solution

  • You can maybe take a look on this. You problem seems easy to solve. http://www.raywenderlich.com/87004/getting-started-with-os-x-and-swift-tutorial-part-3