---
title: "touchBar(_:makeItemForIdentifier:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstouchbardelegate/touchbar(_:makeitemforidentifier:)"
---

# touchBar(_:makeItemForIdentifier:)

Asks the delegate object for the bar item for the specified bar and item identifier.

## Declaration

```swift
@MainActor optional func touchBar(_ touchBar: NSTouchBar, makeItemForIdentifier identifier: NSTouchBarItem.Identifier) -> NSTouchBarItem?
```

## Parameters

- `touchBar`: The bar that’s requesting the bar item.
- `identifier`: The item identifier associated with the item being requested.

## Return Value

Return Value A fully initialized bar item for the specified bar and identifier.

## Discussion

Discussion When the system needs to populate a bar’s items array, the system calls this delegate method to retrieve an item if that item can’t be found in the bar’s private array or in the bar’s templateItems property.
