How to go to second view controller after click on disclosure indicator button

[亡魂溺海] 提交于 2019-12-29 09:34:36

问题


I would like to remove existing annotation from mapview. Scenerio is to click on existing annotation callout part (disclosureindicator button) and it would lead user to another viewcontroller and shows a button you could remove the selected annotation. Actually, I am working on to create exactly same google map application, that is part I am struggling now. Any help would be appreciated!


回答1:


The MKMapView class has two methods you need to add/remove annotations:

addAnnotation: id <MKAnnotation>
removeAnnotation: id <MKAnnotation>

You'd create a class that implements the protocol MKAnnotation. Here's an example in another SO question: MKAnnotation, simple example



来源:https://stackoverflow.com/questions/12594112/how-to-go-to-second-view-controller-after-click-on-disclosure-indicator-button

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!