On mkuserlocation, how do I show my own custom message in viewForAnnotation

前端 未结 3 1565
灰色年华
灰色年华 2021-01-28 06:09

I want to show a custom message instead of \"My Location\" in viewForAnnotation. How do I do this?

Thanks Deshawn

3条回答
  •  失恋的感觉
    2021-01-28 07:04

    Simply referring directly to it works too, like this...

    mapView.userLocation.title = @"I am here";
    

    This can be done from anywhere you have a reference to the map view.

提交回复
热议问题