【发布时间】:2015-10-26 00:43:31
【问题描述】:
我正在为 ios 9 开发应用程序。自从我更新到 7.1 版本后,我遇到了这个错误: 由于信号导致命令失败:分段错误:11
查看代码,我发现是这段代码导致了这个错误:
func mapView(mapView: MKMapView, viewForAnnotation annotation: MKAnnotation) -> MKAnnotationView? {
if !(annotation is ADBaseAnnotation){
print("No es ADBaseAnnotation",terminator:"\n")
return nil
}
var anView = mapView.dequeueReusableAnnotationViewWithIdentifier((annotation as! ADBaseAnnotation).getReuseId())
if let normal = annotation as? NormalParking {
//anView = normal.getAnnotationView(annotation, reuseIdentifier: normal.getReuseId())
} else if let hightlight = annotation as? HightLightParking{
//anView = hightlight.getAnnotationView(annotation, reuseIdentifier: hightlight.getReuseId())
}
return anView
}
错误是由注释行引起的。请帮忙
【问题讨论】: