使 MKMapView 透明但保持覆盖层不透明
有没有办法使地图有些透明,但保持所有添加的叠加层不透明? 调整地图的 Alpha 值当然也会设置覆盖层的 Alpha 值。
Is there a way to make the map somewhat transparent but keep all the added overlays opaque?
Adjusting the alpha for the map will of course set it for the overlays as well.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您将不得不摆弄
MKMapView
的子视图,这是可能的,但完全没有文档记录,并且 Apple 不推荐。基本上,您需要找到具有实际地图的子视图并设置其 alpha。不保证它真的有效!You would have to fiddle around with
MKMapView
's subviews which is possible but completely undocumented and not recommended by Apple. Basically you'd need to find the subview with the actual map and set its alpha. No guarantee it'll actually work!