Como adicionar um UIButton a um MKAnnotation (MKView)?
-
05-07-2019 - |
Pergunta
Eu quero adicionar um botão capaz de clique a um MKAnnotation como visto neste screenshot da aplicação Mapas:
prévia http://www.img-hosting.de/bilder/24558PlacemarkWithIconpng
Solução
UIButton *disclosureButton = [UIButton buttonWithType: UIButtonTypeDetailDisclosure];
annoView.canShowCallout = YES;
annoView.rightCalloutAccessoryView = disclosureButton;
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow