---
title: itemWillCollapseNotification
framework: appkit
role: symbol
role_heading: Type Property
path: appkit/nsoutlineview/itemwillcollapsenotification
---

# itemWillCollapseNotification

Posted before an item is collapsed (after the user clicks the arrow but before the item is collapsed).

## Declaration

```swift
class let itemWillCollapseNotification: NSNotification.Name
```

## Discussion

Discussion The notification object is the NSOutlineView object that contains the item about to be collapsed. A collapsed item’s children will lose their status as being selected. The userInfo dictionary contains the following information:  |   |  To observe this notification using Swift concurrency, use NSOutlineView.ItemWillCollapseMessage.

## See Also

### Notifications

- [columnDidMoveNotification](appkit/nsoutlineview/columndidmovenotification.md)
- [columnDidResizeNotification](appkit/nsoutlineview/columndidresizenotification.md)
- [itemDidCollapseNotification](appkit/nsoutlineview/itemdidcollapsenotification.md)
- [itemDidExpandNotification](appkit/nsoutlineview/itemdidexpandnotification.md)
- [itemWillExpandNotification](appkit/nsoutlineview/itemwillexpandnotification.md)
- [selectionDidChangeNotification](appkit/nsoutlineview/selectiondidchangenotification.md)
- [selectionIsChangingNotification](appkit/nsoutlineview/selectionischangingnotification.md)
