I am unsure how to annotate a map in the swift language. I don\'t know how to create the NSObject class. The following is code I tried but was unable to run:
imp
This gives you the result:
class MapPin : NSObject, MKAnnotation {
var coordinate: CLLocationCoordinate2D
var title: String?
var subtitle: String?
init(coordinate: CLLocationCoordinate2D, title: String, subtitle: String) {
self.coordinate = coordinate
self.title = title
self.subtitle = subtitle
}
}