Instance Property

device

The Metal device responsible for the layer’s drawable resources.

Declaration

var device: MTLDevice? { get set }

Discussion

This property determines which device Metal uses for creating the MTLTexture objects you use for rendering layer content.

The default value is nil—you must set the device for a layer before rendering.