【问题标题】:How to setup constraint for 2 Labels and One UIImageView in Tableview Cell using storyboard?如何使用情节提要在 Tableview Cell 中为 2 个标签和一个 UIImageView 设置约束?
【发布时间】:2021-02-27 10:28:10
【问题描述】:

如何使用 storyboard 为 Tableview Cell 中的 2 个 Label 和 1 个 UIImageView 设置约束?如何使用 storyboard 为 Tableview Cell 中的 2 个 Label 和 1 个 UIImageView 设置约束?

【问题讨论】:

  • 请解释清楚您的要求,因为上述问题是一个模糊的问题
  • 我想为左 UIImageView 、两个标签和右 UIImageView 添加适当的约束,但我不知道如何

标签: ios swift storyboard constraints


【解决方案1】:

尝试将标签嵌入垂直 UIStackView,然后将图像和新 UIStackView 嵌入水平 UIStackView。 然后将最后一个 UIStackView 约束到单元格的边缘。 最终设置这两个堆栈视图的间距,就完成了。

【讨论】:

    猜你喜欢
    • 2018-11-06
    • 1970-01-01
    • 1970-01-01
    • 2019-12-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-11-01
    • 2017-09-17
    相关资源
    最近更新 更多