简体   繁体   English

Xcode:Autolayout将视图设置为始终位于顶部

[英]Xcode:Autolayout set a view to always be in top

I'm trying to set a view to always be in top be so far I have not figure out how to do it. 我试图设定一种观点,使其始终处于领先地位,到目前为止,我还没有弄清楚如何做到这一点。 In this case it shows correctly: 在这种情况下,它可以正确显示:

在此处输入图片说明

But in this case it doesn't: 但是在这种情况下,它不会:

在此处输入图片说明

How do I need to set up my view with auto layout in way the view always shows in top? 如何以自动布局的方式设置视图,使其始终显示在顶部?

I'll really appreciate your help. 非常感谢您的帮助。

Here is how I setup the view in interface builder: 这是我在界面生成器中设置视图的方式:

在此处输入图片说明

Check the screenshots, works well for me. 查看屏幕截图,对我来说效果很好。 约束条件

在此处输入图片说明

在此处输入图片说明

In the Landscape image you shared, status bar is in not changed as per orientation.Make sure you have enabled Landscape-Left and Landscape-Right. 在您共享的风景图像中,状态栏未按方向更改。请确保已启用“风景左”和“风景右”。 Check following image. 检查以下图像。 在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM