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
3
votes
1 answer

How can I animate NSSplitView collapse with auto layout

I have an interface designed as below set up with auto layout in the XIB. [Left Pane]-[Center Pane]-[Right Pane] [ Bottom Pane ] Currently it supports max and min widths/heights for each of the panes as well as collapsing…
xizor
  • 1,554
  • 2
  • 16
  • 35
3
votes
4 answers

NSSplitView - How can I receive a notification AFTER the view has finished resizing?

I need to know when the frame of any NSSplitView subviews have changed, but only after they have finished resizing. Currently I am using this in an NSSplitView subclass: [[NSNotificationCenter defaultCenter] addObserver: self …
Jordan Smith
  • 10,310
  • 7
  • 68
  • 114
3
votes
1 answer

Change divider positions in NSSplitView when subviews change

I have an NSSplitView with four subviews. Each subview has a header with some text and an on/off checkbox, and below it an NSTableView. The user can toggle visibility of the table by using the checkbox. If the table is visible at program start, and…
Carelinkz
  • 936
  • 8
  • 27
3
votes
1 answer

How to change the NSSplitView divider thickness to 1px?

I would like to make the divider of an NSSplitView very thin, only 1px wide like Mail.app, Xcode.app, and many other Mac applications. What is a good way to do this? I have experimented with setting the divider style in Interface Builder as well as…
Daniel Trebbien
  • 38,421
  • 18
  • 121
  • 193
3
votes
2 answers

NSTableHeaderView prevents auto layout from resizing scroll view in a split view

The question: Why having a header view prevents scroll view from being resized by auto layout? I'm trying to embed my custom view in a scroll view, which in turn is enclosed in a split view. I've created the following view hierarchy using Interface…
samuke
  • 450
  • 1
  • 5
  • 15
3
votes
1 answer

NSView added as subview doesn't show

I have a puzzling problem. Working on a cocoa app in mac os x 10.7. My app main window contains a split view. In a certain use context in one of the subviews of the split view is loaded a custom view with some labels (nstextfield) and a split view…
Marco.GLA
  • 31
  • 3
2
votes
1 answer

NSSplitView dividerColor override not working for sidebar divider in macOS 11

I have a small app that contains an NSSplitViewController with 3 vertical split views (sidebar, content view, details view) kind of like the Mail app. I have programmatically changed the color of the divider between the different split views and…
cgiacomi
  • 4,629
  • 6
  • 27
  • 33
2
votes
1 answer

Setting view in NSSplitView not working

Please excuse my ignorance, I'm coming from iOS to Mac programming. I have two nibs. One is the main window with the split view. The nib contains a navigationController view I created. I'm trying to replace the right pane of the split view…
kodai
  • 3,080
  • 5
  • 32
  • 34
2
votes
2 answers

NSSplitView: custom double click handler

I'm trying to find out how can I detect a double-click on the NSSplitView divider. It seems to me that divider is exposed neither to the NSSplitViewDelegate, nor to the NSSplitViewController. What I have found so far is that the divider is an…
vookimedlo
  • 1,209
  • 12
  • 24
2
votes
1 answer

NSSplitView subview size programmatically constrained to container NSSplitView's size

It is hard to put this problem into words, but a real world example will help. If you look at the iTunes app, it appears to have a NSSplitView for the Sidebar | Content split, and a nested NSSplitView for the source list and artwork panel. ======>…
coneybeare
  • 33,113
  • 21
  • 131
  • 183
2
votes
0 answers

Change view in NSSplitView on changing selection of NSTableView

I try to learn Core Data and am stumbling across a problem: I set up a simple data model and I used bindings to show some properties of my entity instances in a table view. The table view is embedded (left side) in a split view. If something is…
DaPhil
  • 1,509
  • 4
  • 25
  • 47
2
votes
0 answers

How do i implement nested NSSplitView like below?

I am trying to implement this with autolayout after running my application, second splitview is showing like this :( Can anyone please guide me to solve this
Mounika
  • 412
  • 2
  • 20
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…
2
votes
1 answer

NSSplitter how to prevent proportional space distribution on resize

I have a window with a source list sidebar at the right side and a content view on the left both inside an NSSplitView. When i resize the window, the additional space is distributed to the source list and the content view. How can i make the source…
Lothar
  • 12,537
  • 6
  • 72
  • 121
2
votes
2 answers

How can I set the position of a NSSplitView nowadays? setPosition:ofDividerAtIndex: doesn't work and I'm not sure how to make a temporary constraint

I have a vertical NSSplitView with a NSScrollView(NSOutlineView, source list, no header view) on the left and a WebView on the right. All the views have initial frames of NSZeroRect. Autoresizing masks are off for the NSSplitView, NSScrollView, and…
andlabs
  • 11,290
  • 1
  • 31
  • 52