delegate
The view’s delegate.
Declaration
weak var delegate: (any MTKViewDelegate)? { get set }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.