Mani Mani - 5 days ago 6
iOS Question

How to show the user location icon on top of the pin image?

How to show the user location icon(blue dot) on the top of the map view pin image.
Now the user location icon is hidden by the pin image.(below the pin image).

How to do this task ?(check screenshot)

Is it possible to show the user location icon on the top of the image ?

Thank you.
enter image description here

Answer

You can fetch the annotation for the userLocation and bring his view to front.

MKAnnotationView *annotationView = [self.mapView viewForAnnotation:self.mapView.userLocation];
[annotationView.superView bringSubviewToFront:annotationView];
Comments