Instance Method

position(x:y:)

Fixes the center of the view at the specified coordinates in its parent’s coordinate space.

Declaration

func position(x: CGFloat = 0, y: CGFloat = 0) -> some View

Parameters

x

The x-coordinate at which to place the center of this view.

y

The y-coordinate at which to place the center of this view.

Return Value

A view that fixes the center of this view at x and y.