简体   繁体   English

不同宽度和高度的UIStackView子StackViews

[英]UIStackView Sub StackViews with Different widths and different heights

Hi I am new to UISTackView concept , I know iOS 9 is still in beta. 嗨,我是UISTackView概念的UISTackView ,我知道iOS 9仍处于测试阶段。 I have a UIStackView fills entire screen, stackview contains a number of sub UISTackViews (Nested UIStack views) , that sub UIStackViews having different heights , widths , different sizes , different centers , different margins it's just like random . 我有一个UIStackView填充整个屏幕,stackview包含许多子UISTackViews (Nested UIStack views) ,这些子UIStackViews具有不同的高度,宽度,不同的大小,不同的中心,不同的边距,就像random一样。

How can I achieve this? 我该如何实现?

It's a bit unclear what you're trying to achieve, so if you could clarify your question that would be helpful. 尚不清楚您要达到的目标,因此,如果您能澄清自己的问题会有所帮助。

In interface builder, you can simple hold command and select all the items you want to add to a stack view and then click the stack button at the bottom right of the screen. 在界面生成器中,您可以简单地执行hold命令并选择要添加到堆栈视图中的所有项目,然后单击屏幕右下方的堆栈按钮。 (It's the left most of the three, and looks like a stack). (它是三个中最左边的一个,看起来像一个堆栈)。

Then if you add other elements, you can command select everything, including another stack view and click the stack view button again. 然后,如果添加其他元素,则可以命令选择所有内容,包括另一个堆栈视图,然后再次单击堆栈视图按钮。 This will put everything within an even larger stack view. 这会将所有内容放入更大的堆栈视图中。 You can continue doing this over and over. 您可以反复进行此操作。

Cheers! 干杯!

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

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