---
title: delegate
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nstouchbar/delegate
---

# delegate

The delegate that provides items to the Touch Bar.

## Declaration

```swift
weak var delegate: (any NSTouchBarDelegate)? { get set }
```

## Discussion

Discussion Employ a bar delegate, according to the needs of your app, to dynamically create items (NSTouchBarItem instances). For more information, see Item objects. This property is conditionally archived, as described in the encodeConditionalObject(_:forKey:) method.

## See Also

### Providing bar items

- [templateItems](appkit/nstouchbar/templateitems.md)
- [defaultItemIdentifiers](appkit/nstouchbar/defaultitemidentifiers.md)
- [principalItemIdentifier](appkit/nstouchbar/principalitemidentifier.md)
- [escapeKeyReplacementItemIdentifier](appkit/nstouchbar/escapekeyreplacementitemidentifier.md)
