Generic Structure

HStack

A view that arranges its children in a horizontal line.

Declaration

@frozen struct HStack<Content> where Content : View

Topics

Creating a Stack

init(alignment: VerticalAlignment, spacing: CGFloat?, content: () -> Content)

Creates an instance with the given spacing and vertical alignment.

struct VerticalAlignment

An alignment position along the horizontal axis.

Applying Standard Modifiers

View Modifiers

Configure this view and the views it contains by applying standard modifiers.

Relationships

Conforms To

See Also

Stacks

struct VStack

A view that arranges its children in a vertical line.

struct ZStack

A view that overlays its children, aligning them in both axes.