简体   繁体   English

垂直空间约束驾驶子视图关闭屏幕

[英]Vertical Space Constraint Driving Subview Off Screen

I have added a vertical space constraint between a subview (Launch Box) and its container view: 我在子视图(“启动框”)及其容器视图之间添加了垂直空间约束:

在此处输入图片说明

Size inspector for the Launch Box: 发射箱的尺寸检查器:

在此处输入图片说明

Size inspector for the container view: 容器视图的大小检查器:

在此处输入图片说明

This is how the storyboard looks like in XCode: 这是XCode中的情节提要的样子:

在此处输入图片说明

But in the simulator the Launch Box is partially out of screen: 但是在模拟器中,启动框部分不在屏幕上:

在此处输入图片说明

There are no other constraints. 没有其他限制。

Any ideas why the Launch Box would be pushed off screen like that? 有什么想法为什么会像这样将启动箱推离屏幕?

It worked after I added height and width constraints to Launch Box: 在向“启动框”添加高度和宽度约束后,它起作用了:

在此处输入图片说明

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

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