问题
I am new to iphone development. I have created map applications and i displayed the cuurent locations and drop a pin to the current location. now i want to display the title and subtitle of the current location when i am clicking the pin. Please help me out.
Thanks.
回答1:
To display title and subtitle your annotation object you add to map must respond to -title
and -subTitle
messages (defined in MKAnnotation
protocol as optional).
Edit: You can also obtain information about given location using MKReverseGeocoder
class that queries google based servises for that and returns data via its delegate (see MKReverseGeocoderDelegate
protocol).
来源:https://stackoverflow.com/questions/2355413/to-display-the-title-for-the-current-loaction-in-map-in-iphone