TagBuilder

@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
@resultBuilder
public enum TagBuilder

A custom parameter attribute that constructs views from closures.

  • Builds an empty view from a block containing no statements.

    Declaration

    Swift

    public static func buildBlock() -> EmptyView
  • Passes a single view written as a child view through unmodified.

    An example of a single view written as a child view is { Text("Hello") }

    Declaration

    Swift

    public static func buildBlock(_ content: some View) -> some TagViewList
  • Undocumented

    Declaration

    Swift

    public static func buildBlock(_ c0: some View, _ c1: some View) -> some TagViewList
  • Undocumented

    Declaration

    Swift

    public static func buildBlock(_ c0: some View, _ c1: some View, _ c2: some View) -> some TagViewList
  • Undocumented

    Declaration

    Swift

    public static func buildBlock(_ c0: some View, _ c1: some View, _ c2: some View, _ c3: some View) -> some TagViewList
  • Undocumented

    Declaration

    Swift

    public static func buildBlock(_ c0: some View, _ c1: some View, _ c2: some View, _ c3: some View, _ c4: some View) -> some TagViewList
  • Undocumented

    Declaration

    Swift

    public static func buildBlock(_ c0: some View, _ c1: some View, _ c2: some View, _ c3: some View, _ c4: some View, _ c5: some View) -> some TagViewList
  • Undocumented

    Declaration

    Swift

    public static func buildBlock(_ c0: some View, _ c1: some View, _ c2: some View, _ c3: some View, _ c4: some View, _ c5: some View, _ c6: some View) -> some TagViewList
  • Undocumented

    Declaration

    Swift

    public static func buildBlock(_ c0: some View, _ c1: some View, _ c2: some View, _ c3: some View, _ c4: some View, _ c5: some View, _ c6: some View, _ c7: some View) -> some TagViewList
  • Undocumented

    Declaration

    Swift

    public static func buildBlock(_ c0: some View, _ c1: some View, _ c2: some View, _ c3: some View, _ c4: some View, _ c5: some View, _ c6: some View, _ c7: some View, _ c8: some View) -> some TagViewList
  • Undocumented

    Declaration

    Swift

    public static func buildBlock(_ c0: some View, _ c1: some View, _ c2: some View, _ c3: some View, _ c4: some View, _ c5: some View, _ c6: some View, _ c7: some View, _ c8: some View, _ c9: some View) -> some TagViewList
  • Provides support for “if” statements in multi-statement closures, producing an optional view that is visible only when the condition evaluates to true.

    Declaration

    Swift

    public static func buildIf(_ content: (some View)?) -> some TagViewList
  • Provides support for “if” statements in multi-statement closures, producing conditional content for the “then” branch.

    Declaration

    Swift

    public static func buildEither<TrueContent, FalseContent>(first: TrueContent) -> ConditionalSingleTag<TrueContent, FalseContent> where TrueContent : View, FalseContent : View
  • Provides support for “if-else” statements in multi-statement closures, producing conditional content for the “else” branch.

    Declaration

    Swift

    public static func buildEither<TrueContent, FalseContent>(second: FalseContent) -> ConditionalSingleTag<TrueContent, FalseContent> where TrueContent : View, FalseContent : View