Instance Property

displayModeButtonItem

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

Declaration

var displayModeButtonItem: UIBarButtonItem { get }

Return Value

A preconfigured bar button item that changes the display mode.

Discussion

Incorporate this button into your user interface when you want to give the user an explicit way to change the display mode of the split view controller. Tapping this button changes the display mode to the value last returned by the delegate’s targetDisplayModeForAction(in:) method. Use that method to determine what mode to apply next based on the current configuration of the split view controller.

Do not change the configuration of the returned button. The split view controller updates the button’s configuration and appearance automatically based on the current display mode and the information provided by the delegate object.

See Also

Managing the Display Mode

var preferredDisplayMode: UISplitViewController.DisplayMode

The preferred arrangement of the split view controller interface.

var displayMode: UISplitViewController.DisplayMode

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