Generic Type Method

buildBlock(_:)

Passes a single view written as a child view through unmodified.

Declaration

static func buildBlock<Content>(_ content: Content) -> Content where Content : View

Discussion

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

See Also

Building Blocks

static func buildBlock() -> EmptyView

Builds an empty view from a block containing no statements.

static func buildIf<Content>(Content?) -> Content?

Provides support for “if” statements in multi-statement closures, producing an optional view that is visible only when the condition evaluates to true.