It complains that “Argument type ‘[Location]’ does not conform to expected type ‘MKAnnotation’” in “MapViewController.swift”. and Xcode auto Correction makes It as! MKAnnotation and then error is gone But When I run the app and tap on MapViewController and then app Crashes on a line
mapView.removeAnnotation(locations as ! MKAnnotation)
showing a message in Debug area that Could not cast value of type ‘Swift._EmptyArrayStorage’ (0x10b024d50) to ‘__C.MKAnnotation’ (0x10b034a00)
No idea About That why It happens.