Search code examples
swiftxcode7xcode-storyboard

Tabless NSTabViewController


I am trying to learn some programming for Mac and therefore I am trying to program a small single window application with a navigation located in a sidebar. Via this sidebar buttons I want to change the view that is presented in the Container View. I uploaded my current storyboard below so that you can get an overview of the description above.

Overview: Overview

Since I am currently trying to implement exchanging the views inside the Container View I stumbled over the NSTabViewController class that seemed to provide a convenient way to achieve this. The problem with it is that it doesn't seem possible(couldn't find any hints) to remove the given tab control via the tabstyle attribute like in the NSTabView class.

Questions:

  1. Is it possible to get rid of the default tab control so that it is tabless?
  2. Is there an easier more modern approach of achieving my described 'application'

Solution

  • You can set the style of the tab view to tabless in Interface Builder:

    enter image description here

    Then your items on the left could control which tab should be selected.