草庐IT

ios - TTTAttributedLabel linebreakmode 在 iOS6 中被破坏

coder 2023-10-01 原文

如果我在 TTTAttributedLabel 示例应用“Espresso”中将 linebreakmode 设置为 truncation tail超过 3 行。行数设置为零。我错过了什么?在我注意到 Espresso 应用程序中的这种行为后,我可以不再担心我自己的应用程序中代码的错误。 有什么建议么?谢谢!

最佳答案

我目前遇到了同样的问题。在实际设置文本之前尝试设置 LineBreakMode。例如:

TTTAttributedLabel* descriptionLabel = [[TTTAttributedLabel alloc] initWithFrame:CGRectMake(20, 120, 280, expectedSize.height)];
descriptionLabel.lineBreakMode = UILineBreakModeWordWrap;
descriptionLabel.numberOfLines = 0;
descriptionLabel.text = description;

关于ios - TTTAttributedLabel linebreakmode 在 iOS6 中被破坏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15684370/

有关ios - TTTAttributedLabel linebreakmode 在 iOS6 中被破坏的更多相关文章

随机推荐