Protocol

MTKViewDelegate

Methods for responding to a MetalKit view's drawing and resizing events.

Declaration

@protocol MTKViewDelegate

Overview

An object that implements the MTKViewDelegate protocol can be set as a MTKView object’s delegate. A delegate allows your Metal application to provide a drawing method to a MTKView object and respond to rendering events without subclassing the MTKView class.

Topics

Changing the View’s Layout

mtkView:drawableSizeWillChange:

Updates the view’s contents upon receiving a change in layout, resolution, or size.

Required.

Drawing the View’s Contents

drawInMTKView:

Draws the view’s contents.

Required.

Relationships

Inherits From

See Also

View Management

MTKView

A specialized view that creates, configures, and displays Metal objects.