我工作的代碼刪除所有地圖標註有一個按鈕,但我更新的Xcode 7後,我遇到了錯誤:如何刪除所有地圖標註在SWIFT 2
類型「MKAnnotation」不符合協議「序列類型」
if let annotations = (self.mapView.annotations as? MKAnnotation){
for _annotation in annotations {
if let annotation = _annotation as? MKAnnotation {
self.mapView.removeAnnotation(annotation)
}
}
}
工作很好!謝謝! – user4812000