Instance Method

padding(_:)

Pads this view along all edge insets by the amount you specify.

Declaration

func padding(_ length: CGFloat) -> some View

Parameters

length

The amount to inset this view on each edge.

Return Value

A view that pads this view by the amount you specify.

See Also

Adjusting the Padding of a View

func padding(EdgeInsets) -> View

Pads this view using the edge insets you specify.

Beta
func padding(Edge.Set, CGFloat?) -> View

Pads this view using the edge insets you specify.

Beta

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software