Xcode 地图注释中的连续语句错误
我遵循了一个伟大的在线教程,但我得到了这个错误 一条生产线上的连续冷却塔必须用分隔符隔开Xcode 地图注释中的连续语句错误,xcode,swift,ios8,annotations,mapkit,Xcode,Swift,Ios8,Annotations,Mapkit,我遵循了一个伟大的在线教程,但我得到了这个错误 一条生产线上的连续冷却塔必须用分隔符隔开 func textFieldShouldReturn(textField: UITextField) -> Bool { var annotation = CustomAnnotation(coordinate: locationManager.location, title: textView.text, subtitle: "SubTitle")); myMapView.addAn
func textFieldShouldReturn(textField: UITextField) -> Bool {
var annotation = CustomAnnotation(coordinate: locationManager.location, title: textView.text, subtitle: "SubTitle"));
myMapView.addAnnotation(annotation)
textView.resignFirstResponder()
return true
}
这是有错误的那一行
var annotation = CustomAnnotation(coordinate: locationManager.location, title: textView.text, subtitle: "SubTitle"));
有人能解释一下原因吗
非常感谢您的发言最后还有一句话
var annotation = CustomAnnotation(coordinate: locationManager.location,
title:textView.text, subtitle: “SubTitle"));
你应该把它改成
var annotation = CustomAnnotation(coordinate: locationManager.location,
title:textView.text, subtitle: "SubTitle");
我想你在最后增加了很多