Need help with CNSplitView?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

122 Stars 19 Forks 48 Commits 3 Opened issues


CNSplitView is an feature enhanced derivative of NSSplitView. It has support for sticky top or bottom toolbars for each of its subviews.

Services available


Need anything else?

Contributors list

No Data

Flattr this git repo Travis Status


is an feature enhanced derivative of
. It has support for sticky top or bottom toolbars for each of its subviews. You can configure
to add toolbars with buttons and/or drag handles, you can define the orientation of each button inside the toolbar or center it all.

Here are two shots of the included example application:

CNSplitView Example - Vertical SplitView

CNSplitView Example - Horizontal SplitView

Graphics & Icons

The icon used to show in the example application (green leaf) was taken from IconFinder. It is published under the CC License Attribution-Noncommercial 3.0 and was created by Bruno Maia, IconTexto.


Via CocoaPods

Just add

pod 'CNSplitView'
to your podfile.

Via Git SubModule

into your project directory and execute

You have to replace the

with the real path where your submodules are placed.


Download the entire project from Github via

git clone
into the
directory and drag the underyling
directory to your Xcode project.

How to run the example

To run the example application you have to complete this project by opening a terminal and

into the directory where your
CNSplitView Example.xcodeproj
is. Here you will find a
. Type
pod install
pod update
if you have done it before) to install (or update) all dependencies.
needs another component

After the creation of

CNSplitView Example.xcworkspace
you're done. Now you only have to use the workspace file!


The usage of

is quite simple. In Interfacebuilder just create a new window, grab a
from the objects palette and drop it onto the content view of your window. Select the the size inspector and let it fill the container both horizontally and vertically. Then you select the identity inspector and set the class of this
. In Interfacebuilder you're done for that moment.

On the code side you keep going that easy way. The code of the example application looks like this:

NSMenu *contextMenu = [[NSMenu alloc] init];
[contextMenu addItemWithTitle:@"Add new Item" action:@selector(contextMenuItemSelection:) keyEquivalent:@""];
[contextMenu addItemWithTitle:@"Add new Group" action:@selector(contextMenuItemSelection:) keyEquivalent:@""];
CNSplitViewToolbarButton *button1 = [[CNSplitViewToolbarButton alloc] initWithContextMenu:contextMenu];
button1.imageTemplate = CNSplitViewToolbarButtonImageTemplateAdd;

CNSplitViewToolbarButton *button2 = [[CNSplitViewToolbarButton alloc] init]; button2.imageTemplate = CNSplitViewToolbarButtonImageTemplateRemove;

CNSplitViewToolbarButton *button3 = [[CNSplitViewToolbarButton alloc] init]; button3.imageTemplate = CNSplitViewToolbarButtonImageTemplateLockUnlocked; button3.imagePosition = NSImageRight; button3.title = @"Lock";

CNSplitViewToolbarButton *button4 = [[CNSplitViewToolbarButton alloc] init]; button4.imageTemplate = CNSplitViewToolbarButtonImageTemplateRefresh; button4.title = @"Refresh";

NSTextField *textField = [[NSTextField alloc] init]; [textField setBezeled:YES]; [textField setBezeled:NSTextFieldRoundedBezel]; [textField setToolbarItemWidth:120.0];

NSPopUpButton *popupButton = [[NSPopUpButton alloc] init]; [popupButton setToolbarItemWidth:120]; [popupButton addItemsWithTitles:@[@"Chelsea Manning...", @"Edward Snowden...", @"Aaron Swartz..."]]; [[popupButton cell] setControlSize:NSSmallControlSize];

NSSlider *slider = [[NSSlider alloc] init]; [slider setToolbarItemWidth:120.0]; [[slider cell] setControlSize:NSSmallControlSize];

[toolbar addItem:button1 align:CNSplitViewToolbarItemAlignLeft]; [toolbar addItem:button2 align:CNSplitViewToolbarItemAlignLeft]; [toolbar addItem:button3 align:CNSplitViewToolbarItemAlignRight]; [toolbar addItem:button4 align:CNSplitViewToolbarItemAlignRight]; //[toolbar addItem:popupButton align:CNSplitViewToolbarItemAlignLeft];

self.splitView.delegate = self; self.splitView.toolbarDelegate = self; [self.splitView attachToolbar:toolbar toSubViewAtIndex:attachedSubViewIndex onEdge:CNSplitViewToolbarEdgeBottom];


was written using ARC and should run on 10.7 and above. You have to add the QuartzCore Framework to your project.


The code is provided as-is, and it is far off being complete or free of bugs. If you like this component feel free to support it. Make changes related to your needs, extend it or just use it in your own project. Pull-Requests and Feedbacks are very welcome. Just contact me at [email protected] or send me a ping on Twitter @TheCocoaNaut.


The complete documentation you will find on CocoaDocs.


This software is published under the MIT License.

Software that uses CNSplitView

If you like this component and if you're using it in your own software so please let me know. I'll give you a mention and set a link to your website (or the Mac App Store, if it exists).

is used by this software: * BezierCode - BezierCode is an intuitive vector drawing that generate Objective C code.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.