如何将UIButton添加到MKAnnotation(MKView)?

时间:2009-09-10 10:38:40

标签: iphone objective-c uibutton mapkit mkmapview

我想在MKAnnotation中添加一个可点击按钮,如地图应用程序的屏幕截图所示:

Preview http://www.img-hosting.de/bilder/24558PlacemarkWithIconpng

1 个答案:

答案 0 :(得分:8)

UIButton *disclosureButton = [UIButton buttonWithType: UIButtonTypeDetailDisclosure]; 
annoView.canShowCallout = YES;    
annoView.rightCalloutAccessoryView = disclosureButton;
相关问题