Adds the specified annotation to the map view.
SDKs
- iOS 3.0+
- macOS 10.9+
- Mac Catalyst 13.0+
- tvOS 9.2+
Framework
- Map
Kit
Declaration
func addAnnotation(_ annotation: MKAnnotation)
Parameters
annotation
The annotation object to add to the receiver. This object must conform to the
MKAnnotation
protocol. The map view retains the specified object.