I have add a view with button as a subview to MKAnnotationView
CCBigBubleViewController* buble = [[CCBigBubleViewController alloc] init];
[annotationView addSubView:buble.view];
It is shown perfectly, but the button does't respond to tapping.
I have add a view with button as a subview to MKAnnotationView
CCBigBubleViewController* buble = [[CCBigBubleViewController alloc] init];
[annotationView addSubView:buble.view];
It is shown perfectly, but the button does't respond to tapping.
your annotationView has probably not the right size. Out of it's frame subviews dont respond to touches. For testing this you can clip to bounds.
So make sure your button is inside the frame of your AnnotationView, perhaps sizeToFit will help here.
In your implementation of MKAnnotationView, override the hitTest method:
Your button will then receive touch events.
you will have to create button action in coding like this