添加注释:
let annotation = MKPointAnnotation()
annotation.title = title
annotation.coordinate = coordinate
mapView.addAnnotation(annotation)
然后您可以使用removeAnnotation
将其删除并添加新注释,也可以设置其移动到新坐标的动画:
UIView.animateWithDuration(1.0) {
annotation.coordinate = newCoordinate
}