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

# touchBar

The [`NSTouchBar`](/documentation/AppKit/NSTouchBar) object associated with the responder.

```
var touchBar: NSTouchBar? { get set }
```

## Discussion

If you have not explicitly provided an [`NSTouchBar`](/documentation/AppKit/NSTouchBar) object for a responder by setting this property, the system sends the [`makeTouchBar()`](/documentation/AppKit/NSResponder/makeTouchBar()) message to the responder to create the default bar. This property is archived.

---

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)