An annotation view that displays a balloon-shaped marker at the designated location.


class MKMarkerAnnotationView : MKAnnotationView


Return an instance of this class from the mapView(_:viewFor:) method of your map view delegate when you want to display the same types of markers displayed by Maps.


Setting the Marker Color

var markerTintColor: UIColor?

The background color of the marker balloon.

Setting the Marker Content

var glyphText: String?

The text to display in the marker balloon.

var glyphImage: UIImage?

The image displayed in the marker balloon.

var glyphTintColor: UIColor?

The color to apply to the glyph text or image.

var selectedGlyphImage: UIImage?

The image to display when the marker is selected.

Setting the Visibility

var titleVisibility: MKFeatureVisibility

The visibility of the title text rendered below the marker balloon.

var subtitleVisibility: MKFeatureVisibility

The visibility of the subtitle text rendered below the marker balloon

enum MKFeatureVisibility

Constants indicating the visibility of different map features.

Animating the Marker onto the Screen

var animatesWhenAdded: Bool

A Boolean indicating whether the marker animates into position onscreen.

See Also

Point-Based Location

Annotating a Map with Custom Data

Annotate a map with location-specific data using default and customized annotation views and callouts.

class MKPointAnnotation

A concrete annotation object tied to the specified point on the map.

class MKPinAnnotationView

An annotation view that displays a pin image on the map.

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