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
22
votes
9 answers

NSSplitView and autolayout

How should I use auto layout constrains inside NSSplitView subview? My NSSplitView subview has 3 subview: topPane, tableContainer and bottomPane and I set the constrains like this: NSDictionary* views = NSDictionaryOfVariableBindings(topPane,…
Dmitry
  • 7,300
  • 6
  • 32
  • 55
20
votes
8 answers

NSSplitVIew - auto saving divider positions doesn't work with auto layout enabled

With auto layout enabled, auto saving divider positions by setting an autosave name for the NSSplitView in interface builder results in each divider being completely collapsed on an app restart. Disabling auto layout allows auto save works…
Jordan Smith
  • 10,310
  • 7
  • 68
  • 114
19
votes
11 answers

How to expand and collapse parts of NSSplitView programmatically?

I want to replace RBSplitView with NSSplitView in my existing project. The application is now leopard only and I would like to replace RBSplitView with the new NSSplitView shipped with Leopard. However, I'm missing RBSplitView's handy methods expand…
cocoafan
  • 4,884
  • 4
  • 37
  • 45
16
votes
2 answers

Make the divider of an NSSplitView undraggable and don't show the dragging cursor

I have an NSSplitView (NO UISplitView(Controller)!!) with three subviews. Now, for the last divider (index 1), I want the divider to not show the dragging cursor (two arrows pointing out of eachother). I have this to stop the dragging, but the…
user142019
14
votes
9 answers

NSSplitView: Controlling divider position during window resize

I have an NSSplitView that's having two panes - a sidebar table view on the left and a web view on the right one. I also have a delegate set that's handling constraints for the sidebar like this: - (CGFloat)splitView:(NSSplitView *)splitView…
arnekolja
  • 1,687
  • 5
  • 22
  • 29
14
votes
5 answers

How to expand and collapse NSSplitView subviews with animation?

Is it possible to animate the collapsing and expanding of NSSplitView subviews? (I am aware of the availability of alternative classes, but would prefer using NSSplitView over having animations.) I am using the method -…
Johan Kool
  • 15,637
  • 8
  • 64
  • 81
13
votes
4 answers

Starting Position of NSSplitView divider

How can I set the start position of a NSSplitView? The closest thing I've found that looks like it would work is setPosition //Set splitView position. [splitView setPosition:330 ofDividerAtIndex:0]; This doesn't seem to do anything though, my…
aroooo
  • 4,726
  • 8
  • 47
  • 81
9
votes
4 answers

Dynamically changing the contents of a view in an NSSplitView?

I have an application which has a layout similar to iTunes. The main window is an NSSplitView. Depending on what the user selects in the left column, I need to show a different view. For example, in itunes if you click on "Music" you see a list of…
Jay
  • 19,649
  • 38
  • 121
  • 184
9
votes
8 answers

How to collapse an NSSplitView pane with animation while using Auto Layout?

I've tried everything I can think of, including all the suggestions I've found here on SO and on other mailing lists, but I cannot figure out how to programmatically collapse an NSSplitView pane with an animation while Auto Layout is on. Here's what…
mdiep
  • 373
  • 2
  • 8
9
votes
1 answer

NSSplitView make only one panel expand on window resize using auto-layout?

Is it possible to achieve the following just using the auto-layout options available from Xcode? For example by changing hugging or compression settings. What is the recommended way of achieving this resize behaviour?
Daniel Farrell
  • 9,316
  • 8
  • 39
  • 62
8
votes
6 answers

How to toggle visibility of NSSplitView subView + hide Pane Splitter divider?

We have a parent Split view (NSSplitView), and two subviews, Content and SideBar (the sidebar is on the right). What would be the optimal Cocoa-friendly way to toggle the SideBar view? I would really love it, if the suggested solution includes…
Dr.Kameleon
  • 22,532
  • 20
  • 115
  • 223
8
votes
2 answers

Programmatically resizing NSSplitView

I used to use and love RBSplitView, however I failed at reimplementing it programmatically as a certain version of xcode does not support IB plugins anymore. Therefore I went back to using NSSplitView. NSSplitView is fine for what I need, the thing…
Antwan van Houdt
  • 6,989
  • 1
  • 29
  • 52
8
votes
2 answers

NSSplitViewItem collapse animation and window setFrame conflicting

I am trying to make a (new in 10.10) NSSplitViewItem collapse and uncollapse whilst moving its containing window so as to keep the whole thing "in place". The problem is that I am getting a twitch in the animation (as seen here). The code where I'm…
Teo Sartori
  • 1,082
  • 14
  • 24
8
votes
2 answers

Setting one side of an NSSplitView programmatically

I've got an NSSplitView and on the left side I've got a tableView (like a source list) and depending on row selection, I want to change the the right side of the split view. I can't quite figure out how to do this. When I add my desired subview to…
jbrennan
  • 11,943
  • 14
  • 73
  • 115
8
votes
4 answers

How do I implement a 3 pane NSSplitView with minimum & maximum sizes?

I want to implement a 3-pane vertical NSSplitView (very similar to Mail.app). I'm not really sure where to start. I'm pretty sure I need to implement a NSSplitViewDelegate, but I'm not sure which methods and / or their implementations. The layout I…
Olly
  • 3,409
  • 3
  • 24
  • 28
1
2 3
10 11