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
1
vote
0 answers

NSSplitViewController, Want to disable the behavior of opening sidebar by moving the mouse during full screen

When the screen is set to fullscreen with NSSplitviewController, when the mouse is moved to the left edge, the sidebar opens, or rather, is drawn on top. I want to disable the above behavior while keeping the opening of the sidebar from the menu…
llscsrl
  • 59
  • 6
1
vote
1 answer

How to use the Big-Sur style toolbar + split view from an old codebase?

According to this WWDC 2020 talk, Big Sur's toolbar is automatically sectioned to match and follow the panes of the NSSplitView below. Unfortunately, this requires us to use the post-NSViewController version of NSSplitView api, introduced in 10.10…
Yuji
  • 34,103
  • 3
  • 70
  • 88
1
vote
1 answer

NSSplitViewController does not call delegate methods

I'm using an NSSplitViewController subclass and the delegate methods are not being called. This is purely programmatically without nib/storyboard. The code can be copied to a new project. The file needs to be named main.swift. Also remove "Main…
user1360618
1
vote
1 answer

NSSplitViewController's 'view' outlet should not point to its NSSplitView; use the 'splitView' outlet instead

I've been developing a macOS app using a storyboard that defines a main window with toolbar and splitview. It's written in Swift 3 -- I have not migrated to Swift 4 yet. The splitview has a pane for graphics and another for a text log; both scroll.…
Feldur
  • 1,121
  • 9
  • 23
1
vote
0 answers

How to get parent splitviewcontroller from view(xib)

I'm currently able to achieve this with Storyboards using: var parentSplit : NSSplitViewController? { guard let splitVC = parent as? NSSplitViewController else { return nil } return splitVC } but it returns nil if I try it in a xib file.…
Jerry U
  • 618
  • 9
  • 22
1
vote
1 answer

Collapsing NSSplitViewItem does not call splitViewDidResizeSubviews

I have a class that inherits from NSSplitViewController and overrides the splitViewDidResizeSubviews function. When I call collapse on a NSSplitViewItem inside the NSSplitViewController and I see the NSSplitViewItem visibly resize the…
rogermushroom
  • 5,486
  • 4
  • 42
  • 68
1
vote
1 answer

Connect NSSplitViewController to window

I want to connect my NSSplitViewController to my window in the storyboard of Xcode interface builder: How can I do that?
1
vote
3 answers

Instantiating split view controller by identifier in OS X storyboard does not load view hierarchy

I'm trying to implement a master-detail-detail view in a Swift OS X application. The top-level view controller is an NSSplitViewController with three subview controllers. The master and first detail views are fairly standard with fixed behaviors.…
Doug Knowles
  • 873
  • 1
  • 8
  • 14
1
vote
1 answer

How to access splitViewItems by item name in Swift + Storyboards

I'm currently using a NSSplitViewController that has a two child split view items (one is a View Controller and one is another Split View Controller as shown: I would like to access the split view items programatically to change the collapse status…
gbdavid
  • 1,639
  • 18
  • 40
1
vote
2 answers

Programmatically toggle resize of NSSplitViewItems

I am trying to find a way to programmatically resize NSSplitViewItems. Say the NSWindow frame size is 500x500px. masterViewItem has a width of 100px, while subViewItem has a width of 400px. When FOO, I want masterViewItem to collapse to 0px (towards…
Naoto Ida
  • 1,275
  • 1
  • 14
  • 29
1
vote
0 answers

OSX 10.10 NSSplitViewController content sizes and resizing

The basis of my problem is that when I resize my window, the left pane of my split view resizes and the right side keeps a fixed width, i'd like it to work the other way around. If I try to move the split divider to make the right side bigger, it…
Darren
  • 10,182
  • 20
  • 95
  • 162
0
votes
0 answers

macOS 11: Changing a NSSplitViewItem's NSTitlebarSeparatorStyle does not update immediately

If you change the titlebarSeparatorStyle property of a NSSplitViewItem, the window does not update immediately. You have to set the focus to another app first for the window to update. However the window isn’t update correctly either. For example…
Daniel
  • 1,473
  • 3
  • 33
  • 63
0
votes
1 answer

How can I access a DetailViewController method from SourceViewController; both inside a NSSplitViewController (Objective-C)

I'm new to Objective-C and feel it's important to learn. I gave myself the following challenge: I have a NSSplitViewController setup with two classes for each view; (i) SourceViewController: NSViewController and (ii) DetailViewController:…
awyr_agored
  • 613
  • 3
  • 19
0
votes
2 answers

NSSplitViewController doesn't collapse when created from a Storyboard

I am trying to mimick the behaviour of apps like Notes and Contacts, where when I resize the window the left split view item collapses. I can't recreate this behaviour when using a Storyboard. If I create the NSSplitViewController in code this works…
user7946504
0
votes
1 answer

Detect active NSSplitViewItem

I have a SplitView with (several) SplitViewItems. Echt SplitViewItem has a ViewController with multiple views in it. I need to detect which of the SplitViewItems has the focus of the user. For example: if the user clicks on any control/view (or…
Johannes
  • 307
  • 2
  • 11