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>
viewForAnnotation>
Swift 2.1:
I had the same issue, and found a quick solution, trigger this when needed, also sending it to the main thread would be wise:
var annotationsArray = mapView.annotations mapView.removeAnnotations(mapView.annotations) mapView.addAnnotations(arrayIncs) arrayIncs.removeAll()