【发布时间】:2015-09-29 17:21:44
【问题描述】:
我有工作代码可以使用按钮删除所有地图注释,但在我更新到 xcode 7 后,我遇到了错误:
类型“MKAnnotation”不符合协议“SequenceType”
if let annotations = (self.mapView.annotations as? MKAnnotation){
for _annotation in annotations {
if let annotation = _annotation as? MKAnnotation {
self.mapView.removeAnnotation(annotation)
}
}
}
【问题讨论】: