0

In recent versions of iOS, sometimes the current user's location (the blue dot) becomes smaller and an "Avatar View" of sorts appears (screenshot below).

Is there a way to set a custom view / picture for this "Avatar View"? (not sure what this view is called, not sure if it is even called an "Avatar View")

Avatar View in Map Kit

Jake Chasan
  • 6,290
  • 9
  • 44
  • 90
  • 1
    In mapView(_ mapView: MKMapView, viewFor annotation: MKAnnotation) -> MKAnnotationView? you can check if the annotation is of type MKUserLocation and create a custom annotation view for it. Then you can assign a custom view for detailCalloutAccessoryView property of the annotation view. – Asteroid Aug 06 '22 at 19:26
  • @Asteroid – thanks for the note, unfortunately this does not retain the highlighting behavior of the MKAnnotation that comes default with MapKit. Any chance you have another idea? – Jake Chasan Aug 16 '22 at 15:29

0 Answers0