Instance Property

preferredDisplayMode

The preferred arrangement of the split view controller interface.

Declaration

var preferredDisplayMode: UISplitViewController.DisplayMode { get set }

Discussion

Use this property to specify the display mode that you prefer to use. The split view controller makes every effort to adopt the interface you specify but may use a different type of interface if there is not enough space to support your preferred choice. If changing the value of this property leads to an actual change in the current display mode, the split view controller animates the resulting change.

Setting the value of this property to UISplitViewController.DisplayMode.automatic causes the split view controller to choose the most appropriate display mode for the currently available space. On iPad, this results in use of the mode UISplitViewController.DisplayMode.primaryOverlay in portrait orientations and UISplitViewController.DisplayMode.allVisible in landscape orientations. The default value of this property is UISplitViewController.DisplayMode.automatic.

See Also

Managing the Display Mode

var displayMode: UISplitViewController.DisplayMode

The current arrangement of the split view controller’s contents.

var displayModeButtonItem: UIBarButtonItem

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