<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSToolbarItemGroup/init(itemIdentifier:titles:selectionMode:labels:target:action:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSToolbarItemGroup(cm)groupWithItemIdentifier:titles:selectionMode:labels:target:action:"
  },
  "title" : "init(itemIdentifier:titles:selectionMode:labels:target:action:)"
}
-->

# init(itemIdentifier:titles:selectionMode:labels:target:action:)

Creates a grouped toolbar item with labels.

```
convenience init(itemIdentifier: NSToolbarItem.Identifier, titles: [String], selectionMode: NSToolbarItemGroup.SelectionMode, labels: [String]?, target: Any?, action: Selector?)
```

## Parameters

`itemIdentifier`

The identifier for the grouped toolbar item.

`titles`

An array of titles to present as subitems in the grouped toolbar item.

`selectionMode`

A Boolean value that indicates how the grouped toolbar item presents selections.

`labels`

Labels that correspond to the specified titles.

`target`

The target that the toolbar calls upon selection.

    If target is     `nil`    , the toolbar attempts to invoke the specified action on the first responder and, failing that, passes the action up the responder chain.

`action`

The selector that the toolbar invokes on the target.

---

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)