[英]MKMapView - UIWebView as MKAnnotationView
Is there a way to handle MKAnnotationView as being a container for html formatted text? 有没有一种方法可以将MKAnnotationView作为html格式文本的容器来处理? Generally saying, I would like to control MKAnnotationView through a UIWebView, UIWebView to be the view of the MKAnnotationView.
概括地说,我想通过UIWebView来控制MKAnnotationView,UIWebView是MKAnnotationView的视图。
I assume you mean you'd like to have web views as your map annotations. 我假设您的意思是您希望将网络视图作为地图注释。 You could try making a custom view for your annotation, and adding a web view as a subview of this.
您可以尝试为注释创建自定义视图,然后将网络视图添加为该视图的子视图。 However this could get quite heavy memory wise so you wouldn't want too many of these on your map at once.
但是,这样做可能会占用大量内存,因此您不希望一次在地图上放太多。 If it's a standard view layout you're after you're better off building a native UI and populating it with downloaded data.
如果是标准视图布局,则最好构建本机UI并用下载的数据填充它。
I actually found an answer myself, it might be done, in a very ugly manner, but effectively. 我实际上自己找到了一个答案,可能很丑陋但有效。 Here you are.
这个给你。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.