Comment ajouter un UIButton à une MKAnnotation (MKView)?
-
05-07-2019 - |
Question
Je souhaite ajouter un bouton de clic à une MKAnnotation, comme le montre cette capture d'écran de l'application Maps:
Aperçu http://www.img-hosting.de/bilder/24558PlacemarkWithIconpng
La solution
UIButton *disclosureButton = [UIButton buttonWithType: UIButtonTypeDetailDisclosure];
annoView.canShowCallout = YES;
annoView.rightCalloutAccessoryView = disclosureButton;
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow