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
itemand its children. If False, collapsesitemonly (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.