Contents

scaleEffect(_:anchor:)

Scales this view uniformly by the specified factor, relative to an anchor point.

Declaration

func scaleEffect(_ s: CGFloat, anchor: UnitPoint3D = .center) -> some VisualEffect

Parameters

  • s:

    The scale factor for this view.

  • anchor:

    The anchor point about which to scale the view. Defaults to center.

Return Value

An effect that scales this view by s in all dimensions.

Discussion

The original dimensions of the view are considered to be unchanged by scaling the contents. To change the dimensions of the view, use a modifier like frame() instead.

See Also

Scaling