Contents

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

You use this property in classic split view interfaces only. This button doesn’t affect column-style split view interfaces.

When a user taps this button, the display mode changes 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.

Don’t 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 the delegate object provides.

You must incorporate this button into your user interface yourself.

See Also

Managing the display mode