Inherits from NSSplitView
Conforms to CNSplitViewToolbarDelegate
NSSplitViewDelegate
Declared in CNSplitView.h

Overview

The intention of CNSplitView was to create an extended version of the standard NSSplitView to implement the so beloved feature of Brandon Walkin’s BWToolkit that has support for an anchored toolbar. Since the release of Xcode 4 Apple broke with the less or more well known plugin structure of Xcode 3 and BWToolkit is no longer supported.

Well, CNSplitView tries to fill the hole and provides a feature for adding such a toolbar.

Tasks

Configuring & Handling Toolbars

Managing the Delegate and the Data Source

Properties

draggingHandleEnabled

Property that indicates whether an assistive split view dragging handle is enabled or not.

@property (assign, nonatomic, getter=isDraggingHandleEnabled) BOOL draggingHandleEnabled

Declared In

CNSplitView.h

Instance Methods

attachToolbar:toSubViewAtIndex:onEdge:

Adds a toolbar besides a CNSplitView’s subview.

- (void)attachToolbar:(CNSplitViewToolbar *)theToolbar toSubViewAtIndex:(NSUInteger)dividerIndex onEdge:(CNSplitViewToolbarEdge)anchorEdge

Parameters

theToolbar

An instance of CNSplitViewToolbar.

theSubviewIndex

The subview’s index the toolbar will be attached to. The first index 0 is the leftmost (on vertical orientation) or the topmost (on horizontal orientation) subview.

theEdge

A value provided by the CNSplitViewToolbarEdge enum.

Discussion

This method attaches an instance of a CNSplitViewToolbar to a receivers subview specified by its index on the top or bottom edge of it. The edge the toolbar should be attached to is a value of the CNSplitViewToolbarEdge enum:

typedef enum {
    CNSplitViewToolbarEdgeUndefined = 0,
    CNSplitViewToolbarEdgeBottom,
    CNSplitViewToolbarEdgeTop
} CNSplitViewToolbarEdge;

Note: Attaching a toolbar to the split view doesn’t imply that it will be visible. You have to call showToolbarAnimated: or toggleToolbarAnimated: explicitly.

Declared In

CNSplitView.h

hideToolbarAnimated:

Hides an already visible toolbar.

- (void)hideToolbarAnimated:(BOOL)animated

Parameters

animated

YES the toolbar will be hidden using a slide out animation, otherwise NO for no animation.

Declared In

CNSplitView.h

setDeviderColor:

Sets the color of the split view divider.

- (void)setDeviderColor:(NSColor *)theColor

Parameters

theColor

An instance of NSColor.

Discussion

You can make use of any NSColor instance even with pattern images.

Declared In

CNSplitView.h

showToolbarAnimated:

Shows an attached toolbar.

- (void)showToolbarAnimated:(BOOL)animated

Parameters

animated

YES the toolbar will be shown using a slide in animation, otherwise NO for no animation.

Discussion

Before you can use this function you have to add a toolbar to the split view, of course.

Declared In

CNSplitView.h

toggleToolbarAnimated:

Toggles the visibility of an attached toolbar.

- (void)toggleToolbarAnimated:(BOOL)animated

Parameters

animated

YES for an animated toggle effect, otherwise NO.

Declared In

CNSplitView.h