MapControlsBuilder
@resultBuilder
struct MapControlsBuilderConstructs map controls.
MapControlsBuilder is used in the mapControls view modifier to allow for a natural,
declarative syntax when specifying multiple controls.
-
Provides support for “for” loops in result builder closure.
Declaration
Swift
static func buildArray<C>(_ components: [C]) -> some MapControl where C : MapControl -
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) -> some MapControl where First : MapControl, Second : MapControl -
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) -> some MapControl where First : MapControl, Second : MapControl -
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) -> some MapControl where C : MapControl -
Creates an optional control result.
Declaration
Swift
static func buildOptional<C>(_ component: C?) -> some MapControl where C : MapControl -
Creates a pair of control results.
Declaration
Swift
static func buildPartialBlock<C0, C1>(accumulated: C0, next: C1) -> some MapControl where C0 : MapControl, C1 : MapControl -
Creates a single control result.
Declaration
Swift
static func buildPartialBlock<C>(first: C) -> C where C : MapControl