我正在尝试制作一个您单击的图钉,然后会出现标题和副标题。
到目前为止,这是我的代码:
let span : MKCoordinateSpan = MKCoordinateSpanMake(0.1, 0.1)
let location : CLLocationCoordinate2D = CLLocationCoordinate2DMake(40.750517, -73.987271)
let region : MKCoordinateRegion = MKCoordinateRegionMake(location, span)
mapView.setRegion(region, animated: true)
let annotation = MKPointAnnotation()
annotation.coordinate = location
annotation.title = "Bus Stop"
annotation.subtitle = "Street Name at Street Name"
mapView.addAnnotation(annotation)
问题是我的出现了一个圆形气泡,这不是我想要的,我想要那些在应用程序中使用的传统红色别针,当你点击更多信息时会显示。