<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSToolbar/init(identifier:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSToolbar(im)initWithIdentifier:"
  },
  "title" : "init(identifier:)"
}
-->

# init(identifier:)

Creates a newly allocated toolbar with the specified identifier.

```
init(identifier: NSToolbar.Identifier)
```

## Parameters

`identifier`

A string used by the class to identify the kind of the toolbar.

## Return Value

The initialized toolbar object.

## Discussion

`identifier` is never seen by users and should not be localized. See the [`identifier`](/documentation/AppKit/NSToolbar/identifier-swift.property) property for important information.

## See Also

[`identifier`](/documentation/AppKit/NSToolbar/identifier-swift.property)

The value you use to identify the toolbar in your app.



---

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)