开发者

how to make an event at MKmapview in callOut?

I have MKmapview with an annotation, the开发者_开发问答n if I push or click a pin of annotation,it will show a CallOut such as title or subtitle. but I want to customize it and input an event, such as if I click a CallOut, I will be threw to another view. what should I do? any code to make an event if CallOut was clicked?

how to customize CallOut Bubble?


You have several options:

  1. You can assign leftCalloutAccessoryView and/or rightCalloutAccessoryView properties for your annotation's view - for example use a button there with appropriate action

  2. When user taps annotation callout then annotation gets deselected and you can handle that event in map view's delegate mapView:didDeselectAnnotationView: method

  3. You can try to create you custom callout with whatever behaviour you want. There're several blog posts in the web with examples how to do that (e.g. #1, #2)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜