开发者

Display Apple's call out bubble on custom MKAnnotation

I have a custom MKAnnotation and all the annotations are all in the righ开发者_如何学Ct place and have followed the MKAnnotation's Protocol but i want to display the standard call out bubble when the user taps on the annotation, can I do this or do I have the implement a custom call out bubble?


You need to set the canShowCallout property to YES for the MKAnnotationView you create to represent your particular MKAnnotation.

The call out will use the title property from your MKAnnotation as it's title, and also the subtitle property if it is not nil.

You can set the leftCalloutAccessoryView and rightCalloutAccessoryView properties on the MKAnnotationView if you want or need to. The left view is usually a UIImageView with an icon, and the right view is usually a UIButton that acts as a detail disclosure button.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜