Enumeration

ContentMode

Constants that define how a view's content fills the available space.

Declaration

@frozen enum ContentMode

Relationships

Conforms To

See Also

Scaling Views

func scaledToFill() -> View

Scales the view to fill its parent.

func scaledToFit() -> View

Scales the view to fit its parent.

func scaleEffect(CGFloat, anchor: UnitPoint) -> View

Scales this view’s rendered output by the given amount in both the horizontal and vertical directions, relative to an anchor point.

func scaleEffect(CGSize, anchor: UnitPoint) -> View

Scales this view’s rendered output by the given vertical and horizontal size amounts, relative to an anchor point.

func scaleEffect(x: CGFloat, y: CGFloat, anchor: UnitPoint) -> View

Scales this view’s rendered output by the given horizontal and vertical amounts, relative to an anchor point.

func aspectRatio(CGFloat?, contentMode: ContentMode) -> View

Constrains the view’s dimensions to the specified aspect ratio.

func aspectRatio(CGSize, contentMode: ContentMode) -> View

Constrains the view’s dimensions to the aspect ratio of the specified size.

func imageScale(Image.Scale) -> View

Sets the scale of images inside the view.