How to add an UIButton to a MKAnnotation (MKView)?
-
05-07-2019 - |
Question
I want to add a click able button to a MKAnnotation as seen in this screenshot of the Maps application:
Preview http://www.img-hosting.de/bilder/24558PlacemarkWithIconpng
Solution
UIButton *disclosureButton = [UIButton buttonWithType: UIButtonTypeDetailDisclosure];
annoView.canShowCallout = YES;
annoView.rightCalloutAccessoryView = disclosureButton;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow