---
title: view
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nsopengllayer/view
---

# view

Returns the view associated with the layer.

## Declaration

```swift
weak var view: NSView? { get set }
```

## Discussion

Discussion Subclasses shouldn’t invoke setView:, but can override it if desired to intercept the layer’s association to, or dissociation from, a view.
