Kann sein das ich wieder blind bin..
ich bekomme bei AddAnnotation einen Fehler
"Cannot convert value of type 'feuerwehrInitalCoordinate' to expected argument type '[MKAnnotation]'"
ich habe in einer Class MK Annotation konform deklariert
Alles anzeigen
und versuche im MapViewController die Test AddAnnotation zu setzten
eventuell kann mir jemand helfen..
VG ..
ich bekomme bei AddAnnotation einen Fehler
"Cannot convert value of type 'feuerwehrInitalCoordinate' to expected argument type '[MKAnnotation]'"
ich habe in einer Class MK Annotation konform deklariert
Quellcode
- import MapKit
- import AddressBook
- class feuerwehrInitalCoordinate: NSObject, MKAnnotation
- {
- let title: String?
- let locationName: String?
- let coordinate: CLLocationCoordinate2D
- init(title: String?, locationName: String?, coordinate: CLLocationCoordinate2D)
- {
- self.title = title
- self.locationName = locationName
- self.coordinate = coordinate
- super.init()
- }
- var subtitle: String? {
- return locationName
- }
- }
Quellcode
- let startPunkt = feuerwehrInitalCoordinate(title: "tbm",locationName: "adresse",coordinate: CLLocationCoordinate2D(latitude: 48.218992, longitude: 16.410670))
- mapView.addAnnotations(startPunkt) Fehler "Cannot convert value of type 'feuerwehrInitalCoordinate' to expected argument type '[MKAnnotation]'"
VG ..