Instance Method


Sent just before a new item is added to a toolbar.


optional func toolbarWillAddItem(_ notification: Notification)



A notification named willAddItemNotification.


If you need to cache a reference to a toolbar item or need to set up some initial state before a toolbar item is added, this is where to do it.

See Also

Responding to Additions and Deletions in the Toolbar

func toolbarDidRemoveItem(Notification)

Sent just after an item has been removed from a toolbar.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software