Introducing MKAnnotation

MKAnnotation is an interface for associating your content with a specific map location. Any object can conform to MKAnnotation. To conform to MKAnnotation, an object must implement a coordinate property, which contains a map location. Optional MKAnnotation properties are title, a string containing the annotation's title; and subtitle, a string containing the annotation's subtitle.

When an object conforming to MKAnnotation has its coordinate in the area of the map that is visible onscreen, the map view asks its delegate (usually a view controller) to provide a corresponding object of the MKAnnotationView type. If the user scrolls the map and MKAnnotationView goes off screen, it will be put into a reuse queue and recycled ...

Get iOS 13 Programming for Beginners - Fourth Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.