简体   繁体   English

iOS UIStackView分别更改UIViews的间距

[英]iOS UIStackView individually changing the spacing of UIViews

Looking through the documentation for UIStackView's I found that changing the UIStackView's 'spacing' property to 30 would simultaneously change the distance between all of it's arranged subviews. 浏览UIStackView的文档时,我发现将UIStackView的'spacing'属性更改为30会同时更改其所有排列的子视图之间的距离。

However I couldn't find a property or method to change the distance between individual subviews, I tried to use UILayoutGuide but it didn't work. 但是,我找不到改变单个子视图之间距离的属性或方法,我尝试使用UILayoutGuide,但它不起作用。

如果要单独控制间距,则必须在内容视图之间添加间隔符视图。

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

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