代码之家  ›  专栏  ›  技术社区  ›  jantimon

如何向mkannotation(mkview)添加uibutton?

  •  0
  • jantimon  · 技术社区  · 17 年前

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

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

    1 回复  |  直到 15 年前
        1
  •  8
  •   Jeff Atwood    15 年前
    UIButton *disclosureButton = [UIButton buttonWithType: UIButtonTypeDetailDisclosure]; 
    annoView.canShowCallout = YES;    
    annoView.rightCalloutAccessoryView = disclosureButton;