Force MKMapView viewForAnnotation to update

后端 未结 5 1070
忘掉有多难
忘掉有多难 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:44

    Just spent a couple of hours to get this to work on Xamarin; this is a warning for other Xamarin developers. Make sure you use the ViewForAnnotation method and not the GetViewForAnnotation delegate. I was using the wrong method which returned new annotation views instead of the existing ones... of course it wasn't working!

提交回复
热议问题