MapContentBuilder
@resultBuilder
struct MapContentBuilder-
Provides support for “if-else” statements in result builder closure, producing conditional content for the “if” branch.
Declaration
Swift
static func buildEither<First, Second>(first component: First) -> EitherMapContent<First, Second> where First : MapContent, Second : MapContent -
Provides support for “if-else” statements in result builder closure, producing conditional content for the “else” branch.
Declaration
Swift
static func buildEither<First, Second>(second component: Second) -> EitherMapContent<First, Second> where First : MapContent, Second : MapContent -
Provides support for standalone “if” statements in result builder closure, producing an optional view that is visible only when the condition evaluates to
true.Declaration
Swift
static func buildIf(_ content: (any MapContent)?) -> any MapContent -
Provides support for “if” statements with
#available()clauses in result builder closure, producing conditional content for the “then” branch, i.e. the conditionally-available branch.Declaration
Swift
static func buildLimitedAvailability<C>(_ component: C) -> C where C : MapContent -
Creates an optional content result.
Declaration
Swift
static func buildOptional<C>(_ component: C?) -> some MapContent where C : MapContent -
Creates a pair of content results.
Declaration
Swift
static func buildPartialBlock<C0, C1>(accumulated: C0, next: C1) -> MapContentPair<C0, C1> where C0 : MapContent, C1 : MapContent -
Creates a single content result.
Declaration
Swift
static func buildPartialBlock<C>(first: C) -> C where C : MapContent