iPhone X中的底部边距使用故事板 [英] Bottom Margin in iPhone X using storyboard

查看:208
本文介绍了iPhone X中的底部边距使用故事板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的我有这种情况,

这是我为iphone 8设计的屏幕

There is this screen I designed for iphone 8

正如你在这里看到的那样,有8px的绿色视图通过约束0px固定在超视图的底部在此视图和底部布局指南之间。并且它在所有手机上都能正常工作除了新的iPhone X发生这种情况:

As you can see here there is 8px green view that I pinned to the bottom of the superview by making a constrain of 0px between this view and top of bottom layout guide. and it works fine on all phone EXCEPT for the new iPhone X where this happens:

这不是我想要的行为。我希望像其他iPhone一样,以0保证金固定在底部。

and thats not my intended behaviour. I want to to be as the other iPhones, pinned to the bottom with 0 margin.

是否有使用故事板的解决方案?请仅使用故事板发布解决方案。我知道我可以通过编程方式完成。这应该在故事板上很容易我想。

Is there is a solution for that using the storyboard? Please post solutions using storyboard only. I know that I can do it programmatically. this should be easy on storyboard I guess.

谢谢

推荐答案

1-在故事板中选择您的视图

1- Select your view in storyboard

2- Double点击底部空间约束并选择 Superview 作为第一项
< img src =https://i.stack.imgur.com/F8SKH.pngalt =在此处输入图像说明>

2- Double click on bottom space constraint and select Superview for first item

3-将常量值设置为0

3- Set constant value to 0

这篇关于iPhone X中的底部边距使用故事板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆