Instance Property


The size, in pixels, of textures for rendering layer content.


var drawableSize: CGSize { get set }


By default, a layer vends textures sized to match its content—that is, this property’s value is the layer’s bounds size multiplied by its contentsScale factor.

See Also

Configuring a Metal Layer

var device: MTLDevice?

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

var pixelFormat: MTLPixelFormat

The pixel format of textures for rendering layer content.

var framebufferOnly: Bool

A Boolean value that determines whether the layer’s textures are restricted for use as framebuffer attachments.

var colorspace: CGColorSpace?

The color space of the rendered content.