In our Map, we are going to drop pins down for each restaurant location. These pins are called annotations, more specifically, MKAnnotations. Since we are going to create multiple MKAnnotations, we are going to create a class that subclasses MKAnnotations.
MKAnnotation is a protocol that provides us with information related to a map view. Protocols provide a blueprint for methods, properties, and other required functionality. The MKAnnotation will provide information, such as the coordinates (latitude and longitude), title, and subtitle of the annotation. In order to drop a pin onto a map, we must subclass the MKAnnotation. When we first looked at classes versus structs, we discussed that classes can subclass or inherit from other classes, which means that we can get properties, methods, and other requirements from the class that we are subclassing. Let's create an annotation that subclasses MKAnnotation and see how this works.