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
8
votes
6 answers

How to change color of divider in NSSplitView?

Can we change the color of the divider? Apple documentations says, that we can override -dividerColor in subclass of NSSplitView for this, but it doesn't works for me, or my understanding isn't correct. Also I've try create color layer over divider,…
Akki
  • 1,487
  • 14
  • 25
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
3 answers

Setting minimum width of NSSplitViews

I'm having a heck of a time setting up a simple split view. The first split view is collapsed. I need to set a minimum width for it. Everything I see online (scarce for NSSplitViewController/NSSplitView) is for Objective-C, puts everything in the…
Mike Pulsifer
  • 279
  • 2
  • 11
7
votes
3 answers

NSSplitView: how to not resize with the window but only in "manual" way?

I' ve a simple vertical NSSplitView and I wan't that keeps his size when I resize the windows but I want to allow the resize of the NSSplitView manually when dragging the vertical bar that divides the two views. EDIT. This is the code I' ve added…
Luca
  • 1,704
  • 3
  • 29
  • 42
7
votes
1 answer

NSSplitView divider on INAppStoreWindow title bar

I'm trying to create a Reeder/Sparrow-like UI to handle the content of my app. Currently I use an NSSplitView with two NSViews inside (the one on the left is the list of content and the other on the right is the "inspector"). What I would like to…
once
  • 73
  • 2
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…
6
votes
1 answer

Initial window with no width in application using Storyboards

I am trying to understand Storyboard in XCode. I have created a new Mac OS X Application from template and defined a simple Storyboard, like in the following image: The problem is that when I run the application, my window looks like this: I have…
user1563721
  • 1,373
  • 3
  • 28
  • 46
6
votes
1 answer

Trouble With NSSplitView Starting Sizes (Storyboards and Swift)

I just started a simple Cocoa app using Swift, Storyboards, and a Document. The only change I've made is to replace the default View Controller in Main.storyboard with a Split View Controller. Everything works great as far as the subviews populating…
Jspies
  • 369
  • 3
  • 7
6
votes
2 answers

NSSplitViewController in OSX 10.10 using Xcode 6

According to documentation on NSSplitViewControllers, the associated NSSplitView uses the NSSplitViewController as its delegate. Specifically in the documentation, "The split view controller serves as the delegate of its split view object (the…
Joe Bennett
  • 197
  • 2
  • 8
5
votes
1 answer

Create NSSplitView + subview programmatically

I am trying to create a horizontal NSSplitView programmatically and to add it 2 subviews. Unfortunately, if I have no issue to create the splitview, I do not know how to add the subview. Do you have any idea to do it?
AP.
  • 5,205
  • 7
  • 50
  • 94
5
votes
1 answer

Automatically resizing subview created programmatically

I have a NSSplitView. On the left pane of that split view I have an NSTableView and a custom view created programmatically. I'm using a delegate to make sure my two panes don't resize at the same time. I add my custom view thus: BWAnchoredButtonBar…
ruipacheco
  • 15,025
  • 19
  • 82
  • 138
5
votes
3 answers

Why is my split view behaving like this and how can I fix it?

I created a split view controller that displays two views, like this : When I compile it, it gives me this result : Unfortunately, the first view isn't visible and I must drag from the left hand side of the window to see the two views : First,…
Pop Flamingo
  • 3,023
  • 2
  • 26
  • 64
5
votes
3 answers

How to disable resizing of the subview of NSSplitView in Interface Builder?

I've created in Interface Builder a NSSplitView with two subviews. I want the left-side view to have fixed width. I've tried to define autosizing rules for both subviews but the left subview still changes width on window resizing (split view fills…
dzolanta
  • 641
  • 7
  • 10
5
votes
1 answer

Inconsistent state of NSSplitView

I am playing around with NSSplitView - quite successfully for now but here is my Problem: My SplitView looks like this: Test project here: https://www.dropbox.com/s/amz863l11nvkdir/TestNSSplitView.zip I've implemented - (void)splitView:(NSSplitView…
tuna
  • 931
  • 2
  • 10
  • 28
4
votes
2 answers

How to constrain NSSplitView?

Hi I'm trying to constrain the max and min coordinate of an NSSplitView. I've created a view controller and assigned it as the delegate of an NSSplitView. The delegate methods get called however, the split view does not constrain to the position…
David
  • 14,205
  • 20
  • 97
  • 144
1
2
3
10 11