Hi Leute....
Das hier ist meine Methode in Xcode 9 und Swift 4. Allerdings wirft sie mir den untenstehenden Fehler aus... Irgendjemand eine Idee wo mein Denkfehler liegt?
Das hier ist meine Methode in Xcode 9 und Swift 4. Allerdings wirft sie mir den untenstehenden Fehler aus... Irgendjemand eine Idee wo mein Denkfehler liegt?
Code:
func showSightingsOnMap(location: CLLocation) {
let circleQuery = geoFire!.query(at: location, withRadius: 2.5)
_ = circleQuery.observe(GFEventType.keyEntered, with: { (key, location) in
if let key = key, let location = location {
let anno = PokeAnnotation(coordinate: location.coordinate, pokemonNumber: Int(key)!)
self.mapView.addAnnotation(anno)
}
Initializer for conditional binding must have Optional type, not 'CLLocation'