Force MKMapView viewForAnnotation to update

后端 未结 5 1064
忘掉有多难
忘掉有多难 2021-02-12 22:05

So I have a MKMapView with all my pins added, and the colour of the pin is dependent on whether a value is set for that pin. When I first load the app, viewForAnnotation

5条回答
  •  借酒劲吻你
    2021-02-12 22:43

    I also found this answer helpful: In which case that mapView:viewForAnnotation: will be called?

    Whenever you call addAnnotation method

    - (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id < MKAnnotation >)annotation gets called. 
    

提交回复
热议问题