Closed kkrawczynski closed 7 years ago
i figured out that when you add callout to annotation view like
[self.calloutView presentCalloutFromRect:annotationView.frame inView:annotationView constrainedToView:mapView animated:YES];
then it blocks interaction.
Temporary solution is to add it into main view however you need to handle mapRegionChange as it doesnt move along with annotation
You should be able to have user interaction with the callout even when presented from within an annotation view on an MKMapView
. Check the sample code - there's an example callout on MKMapView
that displays a button that should illustrate how to do it. You need to do some subclassing on the map view for touch interceptions to make it work.
Hi,
thanks for nice library. I've reviewed example in repo and ive found weird issue that only occurs with SMCallout placed on Map -> the same code works fine on scroll view. Im not really sure what the problem is - i suspect something in mapkit itself is canceling touches which prevents tapping button
Sample Code (i put it in viewDidLoad as in repo's example):
PS.
i invoke
[self.calloutView presentCalloutFromRect:annotationView.bounds inView:annotationView constrainedToView:self.view animated:YES];
in didSelectAnnotationView.didDeselectAnnotationView is empty so it doesnt hide callout
Any help appreciated Cheers