小编gab*_*guy的帖子

MapKit - iOS 13 - How to show pin annotations on top on the user location annotation?

Currently, when I try to add an annotation to the map in the user's location the annotation is not showing up. When I set the annotation (using the same code) besides the user's location it does show up.

The code:

let annotation = MKPointAnnotation()
annotation.coordinate = coordinate // set coordinate
annotation.title = "Title"
annotation.subtitle = "Subtitle"
mapView.addAnnotation(annotation)
Run Code Online (Sandbox Code Playgroud)

mapkit swift ios13

5
推荐指数
1
解决办法
250
查看次数

标签 统计

ios13 ×1

mapkit ×1

swift ×1