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:
You can assign leftCalloutAccessoryView and/or rightCalloutAccessoryView properties for your annotation's view - for example use a button there with appropriate action
When user taps annotation callout then annotation gets deselected and you can handle that event in map view's delegate
mapView:didDeselectAnnotationView:
methodYou 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)
精彩评论