One Logo Pool Ball
_MapKit_SwiftUI · IOS API REFERENCE

MapPitchToggle

struct · iOS 17.0+ · SDK 27.1

@MainActor @preconcurrency struct MapPitchToggle

A button that will set the asosciated pitch of the associated `Map` to a pleasing angle if flat, or return to flat if pitched. May be used in conjunction with `Map` as a stand alone view struct PitchButtonTestView: View { @Namespace var mapScope var body: some View { VStack { Map(scope: mapScope) MapPitchToggle(scope: mapScope) } .mapScope(mapScope) } } MapPitchToggle may also be used in conjunction with the `.mapControls()` modifier Map() .mapControls { MapPitchToggle() }

Members (1)

init · iOS 17.0+

init

TypeScript
static init(scope?: (_SwiftUICore_Namespace_ID) | null): Promise<MapPitchToggle>
Swift declaration
@MainActor @preconcurrency init(scope: Namespace.ID? = nil)

Creates a map pitch button. - Parameters: - scope: The namespace passed to the associated Map and .mapScope(). For use outside of .mapControls()

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

MapPitchToggle.body

This protocol needs associated types that cannot yet cross the bridge.

All _MapKit_SwiftUI types →