<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSToolbarDelegate/toolbarWillAddItem(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSToolbarDelegate(im)toolbarWillAddItem:"
  },
  "title" : "toolbarWillAddItem(_:)"
}
-->

# toolbarWillAddItem(_:)

Tells the delegate that the toolbar is about to add the specified item.

```
@MainActor optional func toolbarWillAddItem(_ notification: Notification)
```

## Parameters

`notification`

A notification named [`willAddItemNotification`](/documentation/AppKit/NSToolbar/willAddItemNotification).

## Discussion

Use this method to cache references to new toolbar items or perform any tasks related to the addition of those items.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)