HStack

public struct HStack : View
extension HStack: Renderable

This view arranges subviews horizontally.

  • Declaration

    Swift

    public var viewStore: ViewValues
  • Creates an instance of a view that arranges subviews horizontally.

    Declaration

    Swift

    public init(alignment: VerticalAlignment = .center, spacing: CGFloat? = nil, @ViewBuilder content: () -> View)

    Parameters

    alignment

    The vertical alignment guide for its children. Defaults to center.

    spacing

    The horizontal distance between subviews. If not specified, the distance will use the default spacing specified by the framework.

    content

    A view builder that creates the content of this stack.

  • Declaration

    Swift

    public var body: View { get }
  • Declaration

    Swift

    public func updateView(_ view: UIView, context: Context)
  • Declaration

    Swift

    public func createView(context: Context) -> UIView