MHStack

public struct MHStack<T> : View where T : TagViewList
extension MHStack: _ViewEmptyChecking

A view that arranges its children in a multiple horizontal lines.

The following example shows a simple horizontal stack of five text views:

MHStack(spacing: 10, lineSpacing: 8) {
    Tag("Started")

    Tag("PM01")

    Tag("103-Repair")
}
  • Creates a multiple line horizontal stack with the given spacing and line spacing

    Declaration

    Swift

    public init(spacing: CGFloat? = 8, lineSpacing: CGFloat? = 10, @TagBuilder content: () -> T)

    Parameters

    spacing

    The distance between adjacent subviews, or nil if you want the stack to choose a default distance for each pair of subviews.

    lineSpacing

    The distance between adjacent subviews, or nil if you want the stack to choose a default distance for each pair of subviews.

    content

    A view builder that creates the content of this stack.

  • Declaration

    Swift

    public var body: some View { get }
  • Undocumented

    Declaration

    Swift

    public var isEmpty: Bool { get }