jantimon
jantimon

Reputation: 38142

How to add an UIButton to a MKAnnotation (MKView)?

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

Upvotes: 0

Views: 3615

Answers (1)

Chris Garrett
Chris Garrett

Reputation: 4924

UIButton *disclosureButton = [UIButton buttonWithType: UIButtonTypeDetailDisclosure]; 
annoView.canShowCallout = YES;    
annoView.rightCalloutAccessoryView = disclosureButton;

Upvotes: 8

Related Questions