¿Cómo agregar un UIButton a una MKAnnotation (MKView)?
-
05-07-2019 - |
Pregunta
Quiero agregar un botón capaz de hacer clic en una MKAnnotation como se ve en esta captura de pantalla de la aplicación Mapas:
Vista previa http://www.img-hosting.de/bilder/24558PlacemarkWithIconpng
Solución
UIButton *disclosureButton = [UIButton buttonWithType: UIButtonTypeDetailDisclosure];
annoView.canShowCallout = YES;
annoView.rightCalloutAccessoryView = disclosureButton;
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow