Contents

isCollapsed

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

Declaration

var isCollapsed: Bool { get }

Discussion

This property is set to true when the split view controller content is semantically collapsed into a single container. Collapsing happens when the split view controller transitions from a horizontally regular to a horizontally compact environment. After it has been collapsed, the split view controller reports having only one child view controller in its viewControllers property. When collapsed, the displayMode property has no impact on the appearance of the split view interface.

In a column-style split view interface, if this property is true and the split view controller has a view controller set for its UISplitViewController.Column.compact column, the interface displays that view controller.

The value of this property is false when the split view controller is capable of displaying more than one of its child view controllers at the same time, even if it’s not showing more than one at the moment. In this expanded mode, the split view controller’s configuration of its child view controllers is determined by the displayMode property.

During a transition from an expanded to a collapsed interface, the value of this property is false until after the collapse transition finishes and all of the relevant delegate methods have been called. Similarly, when transitioning back to an expanded interface, the value is true until the transition finishes.

See Also

Managing column dimensions