---
title: delegate
framework: metalkit
role: symbol
role_heading: Instance Property
path: metalkit/mtkview/delegate
---

# delegate

The view’s delegate.

## Declaration

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

## Discussion

Discussion A delegate is optional. If you provide one, the view calls the delegate when it needs to update its contents. You should either provide a delegate or subclass the view to override the draw(_:) method, but not both.
