I am successfully adding annotations to an MKMapView in all but one case:
override func Show()
{
fDimmed = !IsVisible(point: coordinate)
var ann = gMapView.annotations
gMapView.addAnnotation(self)
ann = gMapView.annotations
}
The "ann" variable is just debugging to inspect the annotations list before and after the addition and, sure enough, the annotation is added. However, the app returns to user control without ever calling the
mapView(_ mapView: MKMapView, viewFor: MKAnnotation)
function to actually place the annotation view.
The class is declared as
ViewController: UIViewController, CLLocationManagerDelegate, MKMapViewDelegate {}
and as I said, with several other annotations, it works fine. Any ideas?
Steve.