我允许用户在MKMapView
上创建注释。我希望注释的标题是:"Directions to Here"
。当用户点击标题时,我希望地图应用打开并显示该点,以便用户可以获取路线。
我在这里创建注释的代码:
var annotation = MKPointAnnotation()
annotation.coordinate = location
annotation.title = "Directions to Here"
annotation.title. //Not sure what to put here to make the title a button
annotations.append(annotation)
map.addAnnotation(annotation)