how do I detect a tap on the title of a callout of a annotation? I already have a right callout accessory and a left one, but I want to detect if a user taps on the title (which is in the center on the callout).
If this is not possible, how do I disable hiding the callout if I tap on the title?
it's little late to the answer your question but I'm dealing with same kind of problem recently and make my solution by my self with trial and error. maybe I can help someone who dealing with same problem.
you can also use some custom annotation and callout view classes, there are many example out there. but, there is a another simple way to solve this problem without use the complex foreign classes.
problem definition: I want to be able to trigger some method just by touching in callout view. I don't want to use right or left accesory buttons. but when I touched callout view, view will disapear immediately.
short explanation of solution: simply we use custom "MKPinAnnotationView" with "hittest" to detect touches in callout view.
you can also find github project link at the end of the post.
touchableCallOutsViewController.h
touchableCallOutsViewController.m
myCustomPinAnnotationClass.h
myCustomPinAnnotationClass.m
Here you can download complete project listing with source code https://github.com/ytur/touchableCallOutsForIOSMaps