Enumeration

NSView.LayerContentsPlacement

These constants specify the location of the layer content when the content is not rerendered in response to view resizing. For more information, see the layerContentsPlacement property.

Declaration

enum LayerContentsPlacement : Int

Topics

Constants

case scaleAxesIndependently

The content is resized to fit the entire bounds rectangle.

case scaleProportionallyToFit

The content is resized to fit the bounds rectangle, preserving the aspect of the content. If the content does not completely fill the bounds rectangle, the content is centered in the partial axis.

case scaleProportionallyToFill

The content is resized to completely fill the bounds rectangle, while still preserving the aspect of the content. The content is centered in the axis it exceeds.

case center

The content is horizontally and vertically centered in the bounds rectangle.

case top

The content is horizontally centered at the top-edge of the bounds rectangle.

case topRight

The content is positioned in the top-right corner of the bounds rectangle.

case right

The content is vertically centered at the right-edge of the bounds rectangle.

case bottomRight

The content is positioned in the bottom-right corner of the bounds rectangle.

case bottom

The content is horizontally centered at the bottom-edge of the bounds rectangle.

case bottomLeft

The content is positioned in the bottom-left corner of the bounds rectangle.

case left

The content is vertically centered at the left-edge of the bounds rectangle.

case topLeft

The content is positioned in the top-left corner of the bounds rectangle.