I have a MapViewController class and I set the
mapView.delegate = self
in viewDidLoad. When I first load the map, annotations are rendered correctly. However, after a refresh (e.g., after I hit a button in callout - say 'delete'), all the other pins lose their images and are rendered 'red'.
In my refresh method, I remove all annotations:
mapView.removeAnnotations(mapView.annotations)
and then recreate the annotations in the same manner I created them on initial load.
This code was working fine until today, when I upgraded to Swift 2.0. Was I simply lucky until now or am I missing a new piece of code?
I even tried forcing the pin to default to Green. But no matter what I do (set an image or change colour), post refresh, all pins are red :(