gpt4 book ai didi

ios - 如何使用自动布局/ Storyboard截断 UIImage 旁边的 UILabel?

转载 作者:行者123 更新时间:2023-11-28 21:41:22 24 4
gpt4 key购买 nike

我在 UIImage 旁边有一个 UILabel,如果它开始与相邻的 UIImage 重叠,我希望 UILabel 显示为截断的“...”。

当我想让它截断时,文本在 UIImage 后面:

text is behind the image

我的 UILabel 属性: ui label properties

我的图像属性: image properties

我认为问题出在内容压缩上,但我将 UILabel 的内容抗压缩优先级水平设置为 250,将 UIImage 设置为 1000。这只会将 UILabel 隐藏在 UIImage 后面。

*这是在表格单元格内。我没有使用默认的表格单元格 View ,因为我打算进一步自定义它。

最佳答案

添加从 UILable 到 UIImage 的尾随常数值 5 和小于等于 (<=) 的关系。

关于ios - 如何使用自动布局/ Storyboard截断 UIImage 旁边的 UILabel?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31907449/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com