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.

See Also

Obtaining the Metal Device

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