Instance Method

setSelected(_:animated:)

Sets the selection state of the annotation view.

Declaration

func setSelected(_ selected: Bool, animated: Bool)

Parameters

selected

Contains the value true if the view should display itself as selected.

animated

Set to true if the change in selection state is animated.

Discussion

You should not call this method directly. An MKMapView object calls this method in response to user interactions with the annotation.

See Also

Managing the Selection State

var isSelected: Bool

A Boolean value indicating whether the annotation view is currently selected.