Questions tagged [nssplitviewcontroller]

NSSplitViewController is a View Controller available in Interface Builder since OS X 10.10 that contains split view items (NSSplitViewItem).

NSSplitViewController was designed with the concept of containment: each NSSplitViewItem owns its own NSViewController. This architecture facilitates the separation of logic for each split view item as you are able to develop logic specific to each view in a separate controller.

for more info: NSSplitViewController

38 questions
11
votes
4 answers

NSToolbar in Xcode 7 using Storyboards (NSWindowController -> NSSplitViewController)

Hi I've seen this question asked a few times already but with no definite answer yet so I created it for xcode 7 and swift2 (which may have changed things a bit anyway). I created a project using Xcode 7 and Cocoa OSX Story boards + swift2, so my…
gbdavid
  • 1,639
  • 18
  • 40
8
votes
2 answers

NSSplitViewController based application almost never launches with the correct size

I have this app that uses a NSSplitViewController as the root and has a NSTabViewController connected as its detailViewController. This app is set to launch at 1024x768. The left pane should launch at 320x768 and the right pane (where the…
Duck
  • 34,902
  • 47
  • 248
  • 470
7
votes
3 answers

Set NSSplitViewController Pane's Width Using Swift

Xcode 8.2.1, Swift 3.0.2, macOS 10.12 I have an NSSplitViewController that has 3 panes (please note the NS; this is for a Mac app). I'm trying to set the left-most pane to always have a fixed width and not be resizable. I have tried the…
Clifton Labrum
  • 13,053
  • 9
  • 65
  • 128
7
votes
1 answer

NSToolbarFlexibleSpaceItem is constraint to NSSplitViewItem in Swift

Almost all macOS official apps have this toolbar's feature which the NSToolbarItem flexible space is constraint to NSSplitViewItem view. I first thought maybe there are 3 different sections on NSToolbar. But it just ONE toolbar. You can open Notes…
6
votes
2 answers

Align NSToolbarItems with NSSplitView columns

Finder and Notes have a peculiar behaviour that I am seeking to reproduce. The ‘flexible space’ in the NSToolbar seems to take the dimensions of the split view into account. For instance, the first group of buttons aligns on the left side with the…
5
votes
2 answers

Update second view controller in NSSplitViewController

I have a NSSplitViewController in which first viewcontroller displays a table and second viewcontroller should display a viewcontroller from a list of viewcontrollers based on the selection of table row. I'm using tableViewSelectionDidChange() to…
unknownymouse
  • 399
  • 1
  • 5
  • 21
4
votes
3 answers

NSSplitViewController/NSSplitViewItem support in XIBs

Is there support for NSSplitViewController/NSSplitViewItem for XIBs? I see only NSSplitView Can I just drag&drop NSViewController and subclass it as NSSplitViewController? How do I add NSSplitViewItem that it mostly works out of the box? I can…
Marek H
  • 5,173
  • 3
  • 31
  • 42
4
votes
4 answers

How to set custom NSSplitView with NSSplitViewController?

I'd like to use a custom NSSplitView with my NSSplitViewController. The docs say: To provide a custom split view, set this property at any time before you call super in the inherited viewDidLoad() method; that is, before the split view…
sam
  • 3,399
  • 4
  • 36
  • 51
3
votes
3 answers

How to align a toolbar (or its items) with the leading edge of a split view controller's child?

In iOS, a toolbar can be added to any view. In macOS however, it seems only possible to add a toolbar to a window. I'm working on an app with a split view controller with a toolbar but the toolbar's items only have a meaning with respect to the…
Mischa
  • 15,816
  • 8
  • 59
  • 117
3
votes
2 answers

NSSplitViewController causing contained views to draw over window corners

I'm trying to create a little Finder clone using Cocoa. I'm placing a source list table view (to act as a sidebar) and a standard table view inside of an NSSplitView controlled by an NSSplitViewController. Unfortunately, when I run this, the…
Nik
  • 1,033
  • 2
  • 11
  • 28
3
votes
1 answer

How to disable resizing split view items in NSSplitViewController

I have a split view controller. I made everything working but one thing: The user is able to drag the center bar to adjust the size of the bottom view. I have been fiddling with the storyboard for a while but did not find a way to disable…
Tom Shen
  • 1,838
  • 3
  • 19
  • 40
3
votes
1 answer

Source List Sidebar implementation in Swift with split view

I'm having issues trying to implement a navigation sidebar for an app. Considering that source lists are so prominent in OS X apps and that Apple's Human Interface Guidelines refer to a source list as an ideal way to navigate within an app, I'm…
2
votes
1 answer

macOS: NSToolbar with translucency effect in Big Sur

I am working with a new Xcode project for Big Sur, with a "Split View with Sidebar" scene in the main storyboard. I want to make the window title and toolbar have the translucency effect that you see in the toolbars in Safari or Finder. In my…
Z S
  • 7,039
  • 12
  • 53
  • 105
2
votes
1 answer

Layout issue with NSSplitView inside NSTabView - missing constraints

I made a very simple dummy project to illustrate my problem (using Xcode 8.1 on 10.12.1). I have a storyboard with an NSTabViewController with 2 tabs, one of which is an NSSplitViewController. Although everything seems to work perfectly, I see the…
1
vote
1 answer

I'm looking for a simple splitView macOS template in swift, who can provide a direction?

I'm experienced with iOS development in objective C and swift. Now I want to build a simple macOS application for personal use and when thinking about the user interface i want basically a sidebar with menu links and a right pane with the…
1
2 3