如何将UIButton添加到MKAnnotation(MKView)?
-
05-07-2019 - |
题
我想在MKAnnotation中添加一个可点击按钮,如地图应用程序的屏幕截图所示:
预览http://www.img-hosting.de/bilder/24558PlacemarkWithIconpng
解决方案
UIButton *disclosureButton = [UIButton buttonWithType: UIButtonTypeDetailDisclosure];
annoView.canShowCallout = YES;
annoView.rightCalloutAccessoryView = disclosureButton;
不隶属于 StackOverflow