Instance Method

draw()

Redraws the view’s contents immediately.

Declaration

func draw()

Discussion

This method manually asks the view to draw new contents. This causes the view to call either the draw(in:) method of the view’s delegate or the draw(_:) method of the MTKView subclass. Never call this method inside either drawing function.

See Also

Drawing Your View’s Contents

var enableSetNeedsDisplay: Bool

A Boolean value that indicates whether the view responds to setNeedsDisplay().

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software