作者:小晴天9927 | 来源:互联网 | 2023-05-18 00:35
I'm trying to migrate a app to iOS 11 and for days I'm stuck with one ugly UI bug after the other. This time: MKMapView. I have a bunch of buttons which I pinned to the Safe Area Layout Guides and everything is working fine - except the MKMapView.
我正在尝试将一个应用程序迁移到ios11上,几天来,我一直被一个丑陋的UI bug困扰着。这一次:MKMapView。我有一堆按钮,我把它们固定在安全区域布局指南上,一切都运行良好——除了MKMapView。
It completely ignores the Safe Area and therefore the compass and legal buttons are hidden under bars or my own UI elements. To verify, I created a new project with only one plain UIViewController. Then I added a MKMapView and configured custom "additionalSafeAreaInsets" which are indeed completely ignored.
它完全忽略了安全区,因此指南针和合法按钮被隐藏在条形或我自己的UI元素下。为了验证,我创建了一个只有一个纯UIViewController的新项目。然后我添加了一个MKMapView并配置了自定义的“additionalsafearesets”,实际上完全忽略了它。
The worse is probably that even with just the MKMapView, the legal label looks horribly wrong on iPhone X.
更糟糕的是,即使只使用MKMapView,法律标签在iPhone X上看起来也非常错误。
Question: is there any way I can inset the legal label and the compass to not get hidden by custom views?
问:有什么方法可以让我的合法标签和指南针不被自定义视图隐藏?
3 个解决方案