Contents

collapseItem(_:collapseChildren:)

Collapses a given item and, optionally, its children.

Declaration

func collapseItem(_ item: Any?, collapseChildren: Bool)

Parameters

  • item:

    An item in the receiver.

    Starting in OS X version 10.5, passing 'nil' will collapse each item under the root in the outline view.

  • collapseChildren:

    If True, recursively collapses item and its children. If False, collapses item only (identical to Collapseitem(_:)).

Discussion

For example, this method is invoked with the collapseChildren parameter set to true when a user Option-clicks the disclosure triangle for an item in the outline view (to collapse the item and all its contained items).

For each item collapsed, posts an item collapsed notification.

See Also

Expanding and Collapsing the Outline