Questions tagged [nssplitview]

An NSSplitView object stacks several subviews within one view so that the user can change their relative sizes. By default, the split bars between the views are horizontal, so the views are one on top of the other.

An NSSplitView object stacks several subviews within one view so that the user can change their relative sizes. By default, the split bars between the views are horizontal, so the views are one on top of the other.

Divider indices are zero-based, with the topmost (in horizontal split views) or leftmost (vertical) divider having an index of 0.

The NSSplitViewDelegate protocol defines the optional methods implemented by delegates of NSSplitView objects.

158 questions
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

How to add custom views to the NSSplitView divider

What is the preferred approach to add custom views to the divider of a NSSplitView? Taken the divider XCode uses to separate the CodeView and the Debug-OutputView, how do i add custom controls / views to the divider? Do i have to create a view and…
ovm
  • 2,452
  • 3
  • 28
  • 51
1
vote
1 answer

NSSplitView odd behaviour during hiding subviews

I'm trying to understand how splitview works. I have this simple split view layout. and the button action methods: @IBAction func hideYellow(sender: NSButton){ splitV.arrangedSubviews[0].isHidden = !splitV.arrangedSubviews[0].isHidden …
Teja Nandamuri
  • 11,045
  • 6
  • 57
  • 109
1
vote
1 answer

NSSplitView save and restore splitter position when switching between Vertical and Horizontal layout

In my app I use NSSplitView which has ability to switch between vertical and horizontal layout using - (void)setVertical:(BOOL)flag method. The problem is that when user change layout, splitter always restore its position on 50%/50%. NSSplitView has…
Vladimir Prudnikov
  • 6,974
  • 4
  • 48
  • 57
1
vote
0 answers

Dragging NSSplitView divider does not resize views

I'm working with Cocoa and I create my views in code (no IB) and I'm hitting an issue with NSSplitView. I have a NSSplitView that I configure in the following way in my view controller, in Swift: override func viewDidLoad() { …
Marco83
  • 1,181
  • 1
  • 10
  • 28
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

NSSplitView Collapse Event

I'm trying to implement an NSSplitView similar to Xcode where you can collapse a view by dragging its handle to under half its width and it will collapse automatically. I have that part working, but I need to update the state of a button in the…
Matt
  • 823
  • 1
  • 8
  • 17
1
vote
0 answers

Content of Mac Application not resizing on entering fullscreen mode

I am developing a mac application using an NSSplitView. There are 3 columns, a menu on the left, an NSTableView in the middle and a detail view on the right. All my components use constraints and none of them are set to restrict width or height…
ColinMasters
  • 511
  • 7
  • 19
1
vote
1 answer

How to remove a SubView from a NSSplitView in cocoa?

I'm loading two different views with this IBActions - (IBAction)showFirstView:(id)sender{ theDetailViewController = [DetailViewController new]; [theDetailViewController initWithNibName:@"DetailView" bundle:nil]; NSView *splitRightView…
Mr_Nizzle
  • 6,644
  • 12
  • 55
  • 85
1
vote
3 answers

How to make controller in NSToolbar moving with NSSplitViewController's view like Reeder or Mail.app

I am developing a cocoa application. It contains a toolbar having some feature buttons. Just like Reeder. I want to resize the toolbar section while resizing the split view. Something works like below. How to implement this kind of feature? Any one…
morphinewan
  • 434
  • 2
  • 6
  • 17
1
vote
2 answers

No MouseUp:/Down: on custom view in NSSplitView on Leopard

I am currently working on a project build for OSX 10.5 and up. First of all, the 10.6 users do not see this; only 10.5 users have this issue. You are not able to reproduce this on 10.6. In short: when placing an custom extended class of NSView with…
Ger Teunis
  • 945
  • 1
  • 14
  • 30
1
vote
1 answer

Delegate methods not invoked for nssplitview present on top of another nssplitview

I have a horizontal NSSplitView which sits on top of right sub view of another vertical NSSplitView. I have delegate methods to constraint the left sub view from resizing. But the same delegate methods are never invoked for the horizontal…
Subrat
  • 175
  • 3
  • 13
1
vote
1 answer

Get Child with Focus inside NSSplitView

I have an NSSplitViewController which has two child view controllers. I have a menu action that is passed to the split view controller and I want to be able to send the action triggered by the menu to the appropriate child controller. For example if…
Will Richardson
  • 7,780
  • 7
  • 42
  • 56