iOS Apprentise V5, Tutorial 3, Page 198, Compiling Error

Even add all the MKAnnotation protocol for class Location (as in page 199~200), it still complains
“Argument type ‘[Location]’ does not conform to expected type ‘MKAnnotation’” about the stuff in “MapViewController.swift”.
No idea why.

And, you have to add ‘public’ before the conforming properties of MKAnnotation to avoid the compiling error.

public var coordinate: CLLocationCoordinate2D {
    return CLLocationCoordinate2DMake(latitude, longtitude)
}
1 Like