在堆栈视图中设置某些项之间的空间 [英] Setting space between some items in stack view

查看:116
本文介绍了在堆栈视图中设置某些项之间的空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Interface Builder中,我使用水平UIStackView并希望将项目放置为:

In Interface Builder, I use a horizontal UIStackView and want to place the items as this :

   xx   xx   xx

每个x代表一个项目。 Item1和item2应该相互粘贴,但item2和item3应该是间隔的,依此类推。这意味着我不希望所有项目之间保持恒定的间距。

every x symbolize an item. Item1 and item2 should be stuck one to the other, but item2 and item3 should be spaced and so on. That means I do not want constant spacing between all the items.

我该怎么办?

(可能相当于工具栏的灵活空间) )

How can I do so ?
(maybe an equivalent of flexible space of toolbars)

谢谢!

推荐答案

在水平堆栈内查看还有三个水平堆栈视图,以便您可以控制每个项目的间距和分布。参见附件截图

Inside your horizontal stackView have three more horizontal stack view,so that you can have control over spacing and distribution for your each item.See screenshot attached

这篇关于在堆栈视图中设置某些项之间的空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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