无法将此系列Objective C代码转换为Swift
for (id <MKAnnotation> annotation in mapView.annotations) {
// Do Something
}
当我尝试:
for (annotation:MKannotation in mapView.annotations)
OR
for (annotation in mapView.annotations)
我得到: 预期';'在“for”声明中
谢谢!
答案 0 :(得分:10)
以下是答案:
for annotation in mapView.annotations as [MKAnnotation] {...}