在注释中设置第一个注释

Set first annotation in annotations

好的, 我有一系列酒吧:

var pubs = [Pub(coordinate: CLLocationCoordinate2D(latitude: 43.2282385, longitude: 76.855085)),
    Pub(coordinate: CLLocationCoordinate2D(latitude: 43.2345965, longitude: 76.8907758)).

然后我在我的地图上添加注释:

mapView.addAnnotations(pubs).

然后我select先这样注释:

mapView.selectAnnotation(mapView.annotations.first!, animated: true)

但现在它首先显示 selected 注释,然后显示第二个。

问题: 如何在注解中先设置需要的注解?

谢谢。

Howe 说@ogres:mapView 可能会重新排列 Pubs 的数组,所以我不得不 select 它来自 TableView-s 数组 mapView.selectAnnotation(tableView.annotations.first!, animated: true)