[英]Swift elements's height in stackview
A tableview or a collectionview might be more appropriate for UI containers. tableview 或 collectionview 可能更适合 UI 容器。 They are more suitable for a dynamic feature like you mentioned.
它们更适合您提到的动态功能。 Having said that you can play with the configuration of the stack view distribution, spacing, and alignment to dynamically set the StackView to accommodate the sizes you wish.
话虽如此,您可以使用堆栈视图分布、间距和 alignment 的配置来动态设置堆栈视图以适应您希望的大小。 In addition to set sizes of subview using - intrinsiccontentsize
除了使用 -intrinsiccontentsize 设置子视图的大小
Here are two links that can help you with that: UIStackView 1 UIStackView 2 Intrinsiccontentsize这里有两个链接可以帮助你: UIStackView 1 UIStackView 2 Intrinsiccontentsize
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.