Using MKAnnotationView without MKMapView?

泄露秘密 提交于 2019-11-27 16:42:38

问题


I'm wondering if it's possible to use the MKAnnotationView inside a UIView other than MKMapView? I'm trying to find an alternative to using the undocumented UICalloutView class. I can create the MKAnnotationView and add it to my view, but I can't get it to show.


回答1:


To anyone interested:

I ported the code of Ed Anuff to Objective C. The source is complete with an Example. You can download it here.

Maybe Ed can check it (I hope I did not do too many mistakes) and add it to his git repository.




回答2:


This is a work-alike CalloutView implemented in MonoTouch, if someone creates an Obj-C version, let me know.

http://github.com/edanuff/MonoTouchCalloutView




回答3:


Check out the open-source SMCalloutView, which is a near-exact replica of UICalloutView:

https://github.com/nfarina/calloutview



来源:https://stackoverflow.com/questions/1619245/using-mkannotationview-without-mkmapview

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