<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.2 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTouchBar/delegate",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTouchBar(py)delegate"
  },
  "title" : "delegate"
}
-->

# delegate

The delegate that provides items to the Touch Bar.

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

## Discussion

Employ a bar delegate, according to the needs of your app, to dynamically create items ([`NSTouchBarItem`](/documentation/AppKit/NSTouchBarItem) instances). For more information, see [`Item objects`](/documentation/AppKit/NSTouchBar#Item-objects).

This property is conditionally archived, as described in the <doc://com.apple.documentation/documentation/Foundation/NSKeyedArchiver/encodeConditionalObject(_:forKey:)> method.

---

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)