SplitViews: Using NSSplitView in a variety of different ways

Last Revision:
Version 2.0, 2015-12-03
Upgraded for OS X 10.11 SDK, changed deployment target to 10.7, removed deprecated APIs.
(Full Revision History)
Build Requirements:
OS X 10.11 SDK or later.
Runtime Requirements:
OS X 10.7 or later.

"SplitViews" demonstrates how to use the NSSplitView class. An NSSplitView object stacks several subviews within one view so that the user can change their relative sizes.

This sample shows how to use the following, (refer to the "Splits" menu for access to all the different kinds of split views) -

1) Horizontal and vertical split views

2) Collapsible split views - users can draw a split view divider in one direction enough to collapse a split view area down to zero size, then able to expand it again.

3) Custom dividers - Split views allow for custom dividers allowing you to alter it's size and appearance.

4) Metal-Style split views - After applying "Textured" style to your window, split views can adopt the metal-style appearance along with its window.

5) Real-World Example - In addition this sample shows a real-world example of using split views in a way to easily organize your window's content. In this case, this sample mimicks a mail style organizer window.