我在 swift 中遵循了 Ray Wenderlich MapKit 教程:http ://www.raywenderlich.com/90971/introduction-mapkit-swift-tutorial当我创建 Artwork 类时,我得到了标题中写的错误。我不知道我必须做什么。这是代码:
class Artwork: NSObject, MKAnnotation {
let title: String
let locationName: String
let discipline: String
let coordinate: CLLocationCoordinate2D
init(title: String, locationName: String, discipline: String, coordinate: CLLocationCoordinate2D) {
self.title = title
self.locationName = locationName
self.discipline = discipline
self.coordinate = coordinate
super.init()
}
}
请帮忙!