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

# view

The view displayed in the bar to represent this item.

```
var view: NSView { get set }
```

## Discussion

By default, this property returns the value of [`view`](/documentation/AppKit/NSViewController/view) property from the view controller assigned to the [`viewController`](/documentation/AppKit/NSCustomTouchBarItem/viewController) property.

If you set the value of this property, then the [`viewController`](/documentation/AppKit/NSCustomTouchBarItem/viewController) property is automatically set to `nil`.

---

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)