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

# view

Returns the OpenGL context’s view.

## Declaration

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

## Return Value

Return Value The view, or nil if the receiver has no drawable object, is in full-screen mode, or is in offscreen mode.

## See Also

### Managing the Drawable Object

- [clearDrawable()](appkit/nsopenglcontext/cleardrawable().md)
- [update()](appkit/nsopenglcontext/update().md)
