[英]Autolayout on preview and simulator looks different
Autolayout for landscape mode isn't working. 横向模式的自动版式无法正常工作。 Here's what I see in storyboard (preview):
这是我在情节提要(预览)中看到的内容:
https://i.snag.gy/KZENBG.jpg https://i.snag.gy/KZENBG.jpg
And here's simulator: 这是模拟器:
https://i.snag.gy/4EPsH8.jpg https://i.snag.gy/4EPsH8.jpg
As you can see, toolbar is disappearing to somewhere off the screen. 如您所见,工具栏消失在屏幕之外。 I've tried both
Top Space to Superview = Standart value
and Top Space to Top Layout Guide = Standart value
in toolbar's contraints, but got no result. 我在工具栏的
Top Space to Superview = Standart value
都尝试了Top Space to Superview = Standart value
和“要使用Top Space to Top Layout Guide = Standart value
,但是没有结果。
PS In the portrait mode everything works good. PS在人像模式下,一切正常。
First of all change device in preview and set it to iPhone 5 and then check looking perfect or not.If not then try to set from Size inspector from Utility area. 首先在预览中更改设备并将其设置为iPhone 5,然后检查外观是否完美;如果不正确,请尝试从工具区域的尺寸检查器中进行设置。
If this doesn't work then try this. 如果这不起作用,请尝试此操作。 Delete Derived data of your project.Then run again.
删除项目的派生数据。然后再次运行。 Derived Data located at ~/Library/Developer/Xcode/DerivedData/(your app data)
派生数据位于〜/ Library / Developer / Xcode / DerivedData /(您的应用程序数据)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.