Sets the visible region so that the map displays the specified annotations.
SDKs
- iOS 7.0+
- macOS 10.9+
- Mac Catalyst 13.0+
- tvOS 9.0+
Framework
- Map
Kit
Declaration
func showAnnotations(_ annotations: [MKAnnotation], animated: Bool)
Parameters
annotations
The annotations that you want to be visible in the map.
animated
true
if you want the map region change to be animated, orfalse
if you want the map to display the new region immediately without animations.
Discussion
Calling this method updates the value in the region
property and potentially other properties to reflect the new map region.