[英]IOS Storyboard Constraining Every Subview to bottom of screen
This seems like it should be very simple, but I am having a terrible time trying to get every subview (they act like menu bars) constrained to the bottom of the parent view in the IOS storyboard. 这看起来应该非常简单,但我正在尝试将每个子视图(它们像菜单栏一样)约束到IOS故事板中父视图的底部。
There seems to be automatic constraints placed between the subviews that make them override the constraint I'm trying to set. 在子视图之间似乎存在自动约束,这使得它们覆盖了我试图设置的约束。 I try to take these off, and then place the new constraints, but nothing seem to work as I loop over trying to reset constraints, over and over and over... 我试图取消这些,然后放置新的约束,但似乎没有任何工作,因为我试图重置约束,一遍又一遍地循环...
It should be very simple, set all of the uiviews to a particular width and length and set the distance between the bottom of the superview to be equal to 0. That's it. 它应该非常简单,将所有uiviews设置为特定的宽度和长度,并将superview底部之间的距离设置为等于0.就是这样。
The secret to happy constraint editing in interface builder is simple: 在界面构建器中快乐约束编辑的秘诀很简单:
If that isn't possible, then: 如果那是不可能的,那么:
I've written more about this here but that's the gist of it. 我在这里写了更多关于这个的内容,但这是它的要点。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.