<!--
{
  "availability" : [
    "iOS: 3.2.0 -",
    "iPadOS: 3.2.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UISplitViewController",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UISplitViewController"
  },
  "title" : "UISplitViewController"
}
-->

# UISplitViewController

A container view controller that implements a hierarchical interface.

```
@MainActor class UISplitViewController
```

## Overview

A split view controller is a container view controller that manages child view controllers in a hierarchical interface. In this type of interface, changes in one view controller drive changes in the content of another.

Split view interfaces are most suitable for filterable content or navigating content hierarchies, like traversing the folders and notes within the Notes app to view each note. In the Notes app, selecting a folder in the primary sidebar shows the list of notes in that folder, and selecting a note from the list shows the contents of that specific note in the secondary view.

![Diagram showing a triple-column split view interface with the primary, supplementary,  secondary, and inspector columns labeled.](images/com.apple.uikit/UISplitViewController-1@2x.png)

When you build your app’s user interface, the split view controller is typically the root view controller of your app’s window. The split view controller has no significant appearance of its own. Most of its appearance is defined by the child view controllers you install.

> Note:
> You can’t push a split view controller onto a navigation stack. Although it’s possible to install a split view controller as a child in some other container view controllers, doing so isn’t recommended in most cases. For design guidance, see [Split views](https://developer.apple.com/design/human-interface-guidelines/split-views/).

### Split view styles

In iOS 14 and later, [`UISplitViewController`](/documentation/UIKit/UISplitViewController) supports column-style layouts. A column-style split view controller lets you create an interface with two or three columns by using [`init(style:)`](/documentation/UIKit/UISplitViewController/init(style:)) with the appropriate [`style`](/documentation/UIKit/UISplitViewController/style-swift.property):

- Use the ``doc://com.apple.uikit/documentation/UIKit/UISplitViewController/Style-swift.enum/doubleColumn`` style to create a split view interface with a two-column layout. This style of split view controller manages two child view controllers, placed in the primary and secondary columns.
- Use the ``doc://com.apple.uikit/documentation/UIKit/UISplitViewController/Style-swift.enum/tripleColumn`` style to create a split view interface with a three-column layout. This style of split view controller manages three child view controllers, placed in the primary, supplementary, and secondary columns.

![Diagram showing a double-column and a triple-column split view interface, each with an inspector.](images/com.apple.uikit/UISplitViewController-2~dark@2x.png)

In either the two-column or three-column layout, [`UISplitViewController`](/documentation/UIKit/UISplitViewController) supports an inspector column on the trailing edge of the view. Use the inspector column to provide auxiliary information related to the secondary column, or for controls that affect content in the secondary column.

Before iOS 14, [`UISplitViewController`](/documentation/UIKit/UISplitViewController) supported just one split view interface style with a primary view controller and a secondary view controller. This classic interface style applies to split view controllers created using any other approach than [`init(style:)`](/documentation/UIKit/UISplitViewController/init(style:)). Split view controllers with the classic interface have a [`style`](/documentation/UIKit/UISplitViewController/style-swift.property) of [`UISplitViewController.Style.unspecified`](/documentation/UIKit/UISplitViewController/Style-swift.enum/unspecified) and they don’t respond to any of the column-style APIs introduced in iOS 14 and later.

### Child view controllers

In a column-style split view interface, use the [`setViewController(_:for:)`](/documentation/UIKit/UISplitViewController/setViewController(_:for:)) and [`viewController(for:)`](/documentation/UIKit/UISplitViewController/viewController(for:)) methods to set and get view controllers for each column. The split view controller wraps all of its child view controllers in navigation controllers. If you set a child view controller that’s not a navigation controller, the split view controller creates a navigation controller for it. The split view controller returns your original view controller through [`viewController(for:)`](/documentation/UIKit/UISplitViewController/viewController(for:)), but its [`children`](/documentation/UIKit/UIViewController/children) property contains the navigation controller it used to wrap your view controller. After you assign view controllers to specific columns, you can show and hide those columns using [`show(_:)`](/documentation/UIKit/UISplitViewController/show(_:)) or [`hide(_:)`](/documentation/UIKit/UISplitViewController/hide(_:)).

In a classic split view interface, you can configure the child view controllers using Interface Builder or programmatically by assigning the view controllers to the [`viewControllers`](/documentation/UIKit/UISplitViewController/viewControllers) property. In cases where you need to change either the primary or secondary view controller, it’s recommended that you do so using the [`show(_:sender:)`](/documentation/UIKit/UISplitViewController/show(_:sender:)) and [`showDetailViewController(_:sender:)`](/documentation/UIKit/UISplitViewController/showDetailViewController(_:sender:)) methods. Using these methods (instead of modifying the [`viewControllers`](/documentation/UIKit/UISplitViewController/viewControllers) property directly) lets the split view controller present the specified view controller in a way that’s most appropriate for the current display mode and size class.

### Interface transitions

The split view controller performs collapse and expand transitions in response to certain changes in its interface. For example, transitions occur when the interface’s size class toggles between horizontally regular and horizontally compact, when a user interaction hides or shows a column, or when you hide or show columns programmatically. The split view controller works with its [`delegate`](/documentation/UIKit/UISplitViewController/delegate) object to perform collapse and expand transitions. The delegate is an object you provide that adopts the [`UISplitViewControllerDelegate`](/documentation/UIKit/UISplitViewControllerDelegate) protocol.

In a column-style split view interface, when the interface is collapsed, you can show a different view controller than your primary, supplementary, or secondary. Set the desired view controller for the [`UISplitViewController.Column.compact`](/documentation/UIKit/UISplitViewController/Column/compact) column using [`setViewController(_:for:)`](/documentation/UIKit/UISplitViewController/setViewController(_:for:)). If you want to further customize transitions for collapsing and expanding the interface, see [`Column-style split views`](/documentation/UIKit/UISplitViewControllerDelegate#Column-style-split-views).

Configure your own custom views and interactions to show or hide the inspector column. When the interface is collapsed, the split view controller displays the inspector as a sheet over the secondary column.

For information about managing transitions in classic split view interfaces, see [`Classic split views`](/documentation/UIKit/UISplitViewControllerDelegate#Classic-split-views).

### Display mode

A split view controller’s current display mode represents the visual arrangement of its child view controllers. It determines how many of its child view controllers are shown, and how they’re positioned in relation to each other. For example, you can arrange the child view controllers so that they appear side-by-side, so that only one at a time is visible, or so that one is partially obscured by the others.

You don’t set the display mode directly; instead, you set a preferred display mode by using the [`preferredDisplayMode`](/documentation/UIKit/UISplitViewController/preferredDisplayMode) property. The split view controller makes every effort to respect the display mode you specify, but it may not be able to accommodate that mode visually because of space constraints. For example, the split view controller can’t display its child view controllers side-by-side in a horizontally compact environment. For possible configurations, see [`UISplitViewController.DisplayMode`](/documentation/UIKit/UISplitViewController/DisplayMode-swift.enum).

![Flow diagram showing the possible state transitions between display modes, based on split behavior and column style.](images/com.apple.uikit/UISplitViewController-3@2x.png)

After you set the preferred display mode, the split view controller updates itself and reflects the actual display mode in the [`displayMode`](/documentation/UIKit/UISplitViewController/displayMode-swift.property) property. If you just want to change which columns are shown, try using [`show(_:)`](/documentation/UIKit/UISplitViewController/show(_:)) or [`hide(_:)`](/documentation/UIKit/UISplitViewController/hide(_:)). The split view controller will determine how to update the display mode to display the desired columns.

### Gesture and button support

There are several ways for user interaction to change the current display mode.

The split view controller installs a built-in gesture recognizer that lets the user change the display mode using a swipe. You can suppress this gesture recognizer by setting the [`presentsWithGesture`](/documentation/UIKit/UISplitViewController/presentsWithGesture) property to <doc://com.apple.documentation/documentation/Swift/false>. For example, you might set this property to <doc://com.apple.documentation/documentation/Swift/false> if you want your primary view controller to always be visible.

If [`presentsWithGesture`](/documentation/UIKit/UISplitViewController/presentsWithGesture) is <doc://com.apple.documentation/documentation/Swift/true>, the split view controller also presents a special bar button item for changing the display mode. The split view controller manages the behavior, appearance, and positioning of this item. It appears as a sidebar toggle icon for [`UISplitViewController.SplitBehavior.tile`](/documentation/UIKit/UISplitViewController/SplitBehavior-swift.enum/tile) and as a back-chevron icon for [`UISplitViewController.SplitBehavior.overlay`](/documentation/UIKit/UISplitViewController/SplitBehavior-swift.enum/overlay) and [`UISplitViewController.SplitBehavior.displace`](/documentation/UIKit/UISplitViewController/SplitBehavior-swift.enum/displace). Tapping this button transitions to a new display mode based on the current display mode and split behavior.

For three-column split view interfaces—those with a [`style`](/documentation/UIKit/UISplitViewController/style-swift.property) of [`UISplitViewController.Style.tripleColumn`](/documentation/UIKit/UISplitViewController/Style-swift.enum/tripleColumn)—another property that affects display mode is [`showsSecondaryOnlyButton`](/documentation/UIKit/UISplitViewController/showsSecondaryOnlyButton). When this property is <doc://com.apple.documentation/documentation/Swift/true>, the split view controller presents another bar button item for toggling the display mode to and from [`UISplitViewController.DisplayMode.secondaryOnly`](/documentation/UIKit/UISplitViewController/DisplayMode-swift.enum/secondaryOnly). The split view controller manages the behavior, appearance, and positioning of this item. It appears as a double-arrow icon. When a user taps this button, it toggles the display mode to or from [`UISplitViewController.DisplayMode.secondaryOnly`](/documentation/UIKit/UISplitViewController/DisplayMode-swift.enum/secondaryOnly).

### Split behavior

A split view controller’s split behavior controls how its secondary view controller appears in relation to the others. You can configure this behavior so that the secondary view controller always appears side-by-side with the others, so that it’s partially obscured by the others, or so that it’s displaced offscreen opposite the others to make space for them.

You don’t set the split behavior directly; instead, you set a preferred split behavior by using the [`preferredSplitBehavior`](/documentation/UIKit/UISplitViewController/preferredSplitBehavior) property. This change takes effect after the next layout occurs. The split view controller reflects the actual split behavior in the [`splitBehavior`](/documentation/UIKit/UISplitViewController/splitBehavior-swift.property) property. The value of the [`splitBehavior`](/documentation/UIKit/UISplitViewController/splitBehavior-swift.property) property affects which display modes are available for the split view controller. For possible configurations, see [`UISplitViewController.SplitBehavior`](/documentation/UIKit/UISplitViewController/SplitBehavior-swift.enum).

![Diagram showing a triple-column split view interface using the tile, overlay, and displace split behaviors.](images/com.apple.uikit/UISplitViewController-4@2x.png)

### Column-width customization

You can specify custom widths for the primary, supplementary, secondary, and inspector columns of the split view interface by setting their respective minimum, maximum, and preferred width properties listed in [`Managing column dimensions`](/documentation/UIKit/UISplitViewController#Managing-column-dimensions). If you don’t specify values for these properties, they default to [`automaticDimension`](/documentation/UIKit/UISplitViewController/automaticDimension).

### Message forwarding

A split view controller interposes itself between the app’s window and its child view controllers. As a result, all messages to the child view controllers must flow through the split view controller. Messages are forwarded as appropriate. For example, view appearance and disappearance messages are sent only when the corresponding child view controller actually appears onscreen.

## Topics

### Creating a split view controller

[`init(style:)`](/documentation/UIKit/UISplitViewController/init(style:))

Creates a split view controller with the specified column style.

[`init(nibName:bundle:)`](/documentation/UIKit/UISplitViewController/init(nibName:bundle:))

Creates a split view controller with the nib file in the specified bundle.

[`init(coder:)`](/documentation/UIKit/UISplitViewController/init(coder:))

Creates a split view controller from data in an unarchiver.

### Getting the split view style

[`style`](/documentation/UIKit/UISplitViewController/style-swift.property)

The style that determines the number of columns that the split view interface displays.

[`UISplitViewController.Style`](/documentation/UIKit/UISplitViewController/Style-swift.enum)

Constants that describe the number of columns the split view interface displays.

### Customizing the split view transitions

[`delegate`](/documentation/UIKit/UISplitViewController/delegate)

The delegate you use to manage changes to a split view interface.

[`UISplitViewControllerDelegate`](/documentation/UIKit/UISplitViewControllerDelegate)

The methods adopted by the object you use to manage changes to a split view interface.

### Managing the child view controllers

[`UISplitViewController.Column`](/documentation/UIKit/UISplitViewController/Column)

Constants that describe the columns within the split view interface.

[`setViewController(_:for:)`](/documentation/UIKit/UISplitViewController/setViewController(_:for:))

Presents the provided view controller in the specified column of the split view interface.

[`viewController(for:)`](/documentation/UIKit/UISplitViewController/viewController(for:))

Returns the view controller associated with the specified column of the split view interface.

[`viewControllers`](/documentation/UIKit/UISplitViewController/viewControllers)

The array of view controllers the split view controller manages.

### Displaying the child view controllers

[`show(_:)`](/documentation/UIKit/UISplitViewController/show(_:))

Presents the view controller in the specified column of the split view interface.

[`hide(_:)`](/documentation/UIKit/UISplitViewController/hide(_:))

Dismisses the view controller in the specified column of the split view interface.

[`isShowing(_:)`](/documentation/UIKit/UISplitViewController/isShowing(_:))

A Boolean value that indicates whether the split view interface is showing the specified column.

[`show(_:sender:)`](/documentation/UIKit/UISplitViewController/show(_:sender:))

Presents the specified view controller as the primary view controller in the split view interface.

[`showDetailViewController(_:sender:)`](/documentation/UIKit/UISplitViewController/showDetailViewController(_:sender:))

Presents the specified view controller as the secondary view controller of the split view interface.

### Managing the display mode

[`preferredDisplayMode`](/documentation/UIKit/UISplitViewController/preferredDisplayMode)

The preferred arrangement of the split view interface.

[`displayMode`](/documentation/UIKit/UISplitViewController/displayMode-swift.property)

The current arrangement of the split view interface.

[`displayModeButtonItem`](/documentation/UIKit/UISplitViewController/displayModeButtonItem)

A button that changes the display mode of the split view controller.

[`presentsWithGesture`](/documentation/UIKit/UISplitViewController/presentsWithGesture)

Specifies whether a hidden view controller can be presented and dismissed using a swipe gesture.

[`showsSecondaryOnlyButton`](/documentation/UIKit/UISplitViewController/showsSecondaryOnlyButton)

Specifies whether the secondary view controller shows a button to toggle to and from the secondary-only display mode.

[`UISplitViewController.DisplayMode`](/documentation/UIKit/UISplitViewController/DisplayMode-swift.enum)

Constants that describe the possible arrangements for a split view interface.

[`displayModeButtonVisibility`](/documentation/UIKit/UISplitViewController/displayModeButtonVisibility-swift.property)

A setting that determines whether the display mode button is visible in the interface.

[`UISplitViewController.DisplayModeButtonVisibility`](/documentation/UIKit/UISplitViewController/DisplayModeButtonVisibility-swift.enum)

Constants that determine the visibility of the display mode button.

### Managing the split behavior

[`preferredSplitBehavior`](/documentation/UIKit/UISplitViewController/preferredSplitBehavior)

The preferred behavior that determines how the child view controllers appear in relation to each other.

[`splitBehavior`](/documentation/UIKit/UISplitViewController/splitBehavior-swift.property)

The current behavior that determines how the child view controllers appear in relation to each other.

[`UISplitViewController.SplitBehavior`](/documentation/UIKit/UISplitViewController/SplitBehavior-swift.enum)

Constants that describe the possible ways that the child view controllers appear in relation to each other.

### Managing column dimensions

[`isCollapsed`](/documentation/UIKit/UISplitViewController/isCollapsed)

A Boolean value that indicates whether only one of the child view controllers displays.

[`preferredPrimaryColumnWidthFraction`](/documentation/UIKit/UISplitViewController/preferredPrimaryColumnWidthFraction)

The relative width of the primary view controller’s content.

[`preferredPrimaryColumnWidth`](/documentation/UIKit/UISplitViewController/preferredPrimaryColumnWidth)

The preferred width, in points, of the primary view controller’s content.

[`primaryColumnWidth`](/documentation/UIKit/UISplitViewController/primaryColumnWidth)

The width, in points, of the primary view controller’s content.

[`minimumPrimaryColumnWidth`](/documentation/UIKit/UISplitViewController/minimumPrimaryColumnWidth)

The minimum width, in points, for the primary view controller’s content.

[`maximumPrimaryColumnWidth`](/documentation/UIKit/UISplitViewController/maximumPrimaryColumnWidth)

The maximum width, in points, for the primary view controller’s content.

[`preferredSupplementaryColumnWidthFraction`](/documentation/UIKit/UISplitViewController/preferredSupplementaryColumnWidthFraction)

The relative width of the supplementary view controller’s content.

[`preferredSupplementaryColumnWidth`](/documentation/UIKit/UISplitViewController/preferredSupplementaryColumnWidth)

The preferred width, in points, of the supplementary view controller’s content.

[`supplementaryColumnWidth`](/documentation/UIKit/UISplitViewController/supplementaryColumnWidth)

The width, in points, of the supplementary view controller’s content.

[`minimumSupplementaryColumnWidth`](/documentation/UIKit/UISplitViewController/minimumSupplementaryColumnWidth)

The minimum width, in points, for the supplementary view controller’s content.

[`maximumSupplementaryColumnWidth`](/documentation/UIKit/UISplitViewController/maximumSupplementaryColumnWidth)

The maximum width, in points, for the supplementary view controller’s content.

[`preferredSecondaryColumnWidth`](/documentation/UIKit/UISplitViewController/preferredSecondaryColumnWidth)

The preferred width, in points, for the secondary view controller’s content.

[`preferredSecondaryColumnWidthFraction`](/documentation/UIKit/UISplitViewController/preferredSecondaryColumnWidthFraction)

The relative width of the secondary view controller’s content.

[`minimumSecondaryColumnWidth`](/documentation/UIKit/UISplitViewController/minimumSecondaryColumnWidth)

The minimum width, in points, for the secondary view controller’s content.

[`preferredInspectorColumnWidth`](/documentation/UIKit/UISplitViewController/preferredInspectorColumnWidth)

The preferred width, in points, for the inspector view controller’s content.

[`preferredInspectorColumnWidthFraction`](/documentation/UIKit/UISplitViewController/preferredInspectorColumnWidthFraction)

The relative width of the inspector view controller’s content.

[`maximumInspectorColumnWidth`](/documentation/UIKit/UISplitViewController/maximumInspectorColumnWidth)

The maximum width, in points, for the inspector view controller’s content.

[`minimumInspectorColumnWidth`](/documentation/UIKit/UISplitViewController/minimumInspectorColumnWidth)

The minimum width, in points, for the inspector view controller’s content.

[`automaticDimension`](/documentation/UIKit/UISplitViewController/automaticDimension)

The default value to apply to a dimension.

### Inspecting the layout environment

[`UISplitViewController.LayoutEnvironment`](/documentation/UIKit/UISplitViewController/LayoutEnvironment)

Constants that indicate the current layout of the containing split view controller.

### Positioning the primary view controller

[`primaryEdge`](/documentation/UIKit/UISplitViewController/primaryEdge-swift.property)

The side on which the primary view controller sits.

[`UISplitViewController.PrimaryEdge`](/documentation/UIKit/UISplitViewController/PrimaryEdge-swift.enum)

Constants that indicate the side on which the primary view controller sits.

### Managing the background style

[`primaryBackgroundStyle`](/documentation/UIKit/UISplitViewController/primaryBackgroundStyle)

The background style of the primary view controller.

[`UISplitViewController.BackgroundStyle`](/documentation/UIKit/UISplitViewController/BackgroundStyle)

Styles that apply a visual effect to the background of a primary view controller.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)
