简体   繁体   English

TableViewCell内StackView内的StackView

[英]StackView inside StackView inside TableViewCell

I would like to have a StackView inside a StackView inside a Tableview to achieve that on the left an image is shown and on the right three labels. 我想在Tableview内的StackView内有一个StackView,以实现在左侧显示图像,在右侧显示三个标签。 Each label can have 0 to n rows which should make the cell grow, while the image is of a fixed size. 每个标签可以有0到n行,这应该使单元格增长,而图像的大小是固定的。 XCode is complaining about my construction. XCode抱怨我的构造。 Is there something I'm doing fundamentally wrong? 我从根本上做错了什么吗? Please see my screenshot for details. 请查看我的屏幕截图以获取详细信息。

在此处输入图片说明

Nothing fundamentally wrong, and those warnings are only Interface Builder trying to help as it finds that the current layout doesn't match the constraints. 根本上没有错,这些警告只是Interface Builder试图提供帮助,因为它发现当前布局与约束不匹配。

Xcode can fix that automatically for you by adjusting the layout to suit the constraints: Click on the yellow warning icon and choose to fix issues: the issues listed there should disappear and you might notice some minor adjustments to your layout. Xcode可以通过调整布局以适应约束自动为您解决此问题:单击黄色警告图标并选择解决问题:此处列出的问题应消失,您可能会注意到对布局的一些细微调整。

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

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