gpt4 book ai didi

ios - 在 UILabel 中显示 2 行半行文本

转载 作者:行者123 更新时间:2023-11-28 08:25:34 29 4
gpt4 key购买 nike

我需要使用 wordwrapUILabel 中显示两行半文本,然后在其上附加三个点“...”。

我在 UITableViewCell 中有一个 UILabel,它当前显示三行文本,然后用“...”截断文本,但现在我需要显示最后一行行减半表示大文本中有 2.5 行文本。

最佳答案

你应该去界面生成器,或者只做代码,但你需要实现的是通过将行数从 1 或 0 更改为 3 来完成,如下图:enter image description here

这就是你需要的吗?

关于ios - 在 UILabel 中显示 2 行半行文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40130255/

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