单击/查看注释时使地图视图变暗
当单击注释时,是否可以使 Mapview 变暗/减少黑色背景上的 alpha(类似于在 JS/CSS 灯箱中查看图像)(这又会在地图的下部显示自定义视图(在 话,苹果会
如果有人做到了,如果可以的
拒绝这样的设计吗?谷歌地图暂时查看...
干杯。
Is it possible to make the Mapview darken/decrease the alpha over a black background (similar to viewing images in a JS/CSS lightbox) when a annotation is clicked (which in turn shows a custom View over the lower portion of the map (in essence a small details box).
If anyone has done it, if a snippet / rough idea could be given that would be great.
If it's possible, would apple reject such design? I dont see why they would however its potentially decreasing the view of the google maps view temporarily...
Cheers.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 MKMapViewDelegate 的委托方法来检测何时选择和取消选择注释。当选择时,就像你说的那样,减少 MKMapView 在黑色背景上的 alpha 值以变暗。或者,增加 MKMapView 顶部黑色覆盖层的 Alpha。取消选择注释后,您将恢复正常。我不认为这样的事情会被拒绝,但没有人能够 100% 肯定苹果的批准决定。
You can use the delegate methods of MKMapViewDelegate to detect when the annotations are selected and deselected. When selected, like you said, decrease the alpha of the MKMapView over a black background to darken. Alternatively, increase the alpha of a black overlay thats on top of the MKMapView. When annotation is deselected you go back to normal. I don't think something like this would be rejected but no one can ever be 100% positive of Apple's approval decisions.