简体   繁体   English

使用没有MKMapView的MKAnnotationView?

[英]Using MKAnnotationView without MKMapView?

I'm wondering if it's possible to use the MKAnnotationView inside a UIView other than MKMapView? 我想知道是否可以在除了MKMapView之外的UIView中使用MKAnnotationView? I'm trying to find an alternative to using the undocumented UICalloutView class. 我正在尝试找到使用未记录的UICalloutView类的替代方法。 I can create the MKAnnotationView and add it to my view, but I can't get it to show. 我可以创建MKAnnotationView并将其添加到我的视图中,但我无法显示它。

To anyone interested: 对任何感兴趣的人

I ported the code of Ed Anuff to Objective C. The source is complete with an Example. 我将Ed Anuff的代码移植到Objective C。源代码完成了一个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. 也许Ed可以检查它(我希望我没有做太多错误)并将其添加到他的git存储库中。

This is a work-alike CalloutView implemented in MonoTouch, if someone creates an Obj-C version, let me know. 这是一个在MonoTouch中实现的类似工作的CalloutView,如果有人创建了一个Obj-C版本,请告诉我。

http://github.com/edanuff/MonoTouchCalloutView http://github.com/edanuff/MonoTouchCalloutView

Check out the open-source SMCalloutView , which is a near-exact replica of UICalloutView : 退房的开源SMCalloutView ,这是一个近乎精确的复制品UICalloutView

https://github.com/nfarina/calloutview https://github.com/nfarina/calloutview

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 MKMapView-UIWebView作为MKAnnotationView - MKMapView - UIWebView as MKAnnotationView MKMapView MKAnnotationView发布吗? - MKMapView MKAnnotationView ISSUE? 在 MKMapView 上刷新 MKAnnotationView - Refresh MKAnnotationView on a MKMapView MKAnnotationView从MKMapView窃取触摸 - MKAnnotationView stealing touches from MKMapView iOS旋转MKAnnotationView以响应MKMapView旋转 - iOS rotating MKAnnotationView in response of MKMapView rotation 对MKMapView中的MKAnnotationView进行自定义标注的动画,具有“弹出”效果 - Animating custom callout for MKAnnotationView in MKMapView with “pop in” effect 如何判断MKMapView和可见的MKAnnotationView完成绘制的时间? - How to tell when MKMapView and visible MKAnnotationView are finished drawing? 我可以重新放置已经放置在MKMapView上的MKAnnotationView吗? - Can I reposition an MKAnnotationView that's already been placed on a MKMapView? 在自定义MKAnnotationView中使用UILongPressGestureRecognizer遇到麻烦 - Trouble using UILongPressGestureRecognizer in custom MKAnnotationView 如何在不使用 MKMapView 的情况下检查 MKCoordinateRegion 是否包含 CLLocationCoordinate2D? - How to check if MKCoordinateRegion contains CLLocationCoordinate2D without using MKMapView?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM