Instance Method

showAnnotations:animated:

Sets the visible region so that the map displays the specified annotations.

Declaration

- (void)showAnnotations:(NSArray<id<MKAnnotation>> *)annotations animated:(BOOL)animated;

Parameters

annotations

The annotations that you want to be visible in the map.

animated

YES if you want the map region change to be animated, or NO 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.

See Also

Manipulating the Visible Portion of the Map

region

The area currently displayed by the map view.

- setRegion:animated:

Changes the currently visible region and optionally animates the change.

centerCoordinate

The map coordinate at the center of the map view.

- setCenterCoordinate:animated:

Changes the center coordinate of the map and optionally animates the change.

visibleMapRect

The area currently displayed by the map view.

- setVisibleMapRect:animated:

Changes the currently visible portion of the map and optionally animates the change.

- setVisibleMapRect:edgePadding:animated:

Changes the currently visible portion of the map, allowing you to specify additional space around the edges.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software