想在自定义单元格标签中显示多行 [英] want to display multiple lines in custom cell label

查看:91
本文介绍了想在自定义单元格标签中显示多行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在自定义单元格中有一个标签,在表格视图中有3个标签。我试图在其中一个标签中显示文本消息用户更新状态,但它只显示更新状态并截断消息的其余部分。我需要调整哪些内容才能将整个消息显示在一行中或将其溢出到第二行?感谢您的建议。

I have a label in a custom cell with 3 labels in a table view. I am trying to display a text message "Updated status one of user" in one of the labels, but it displays only "Updated status" and truncates the rest of the message. What can I tweek to display the whole message in a line or spill it to a second line is necessary? Appreciate your suggestions.

推荐答案

好吧,将标签的行数设置为0,并将其 lineBreakMode 设置为 UILineBreakModeWordWrap 如果您希望文本在不适合的情况下换行更多行。否则,请尝试增加标签的宽度。

Well, set the number of lines of your label to 0, and set its lineBreakMode to UILineBreakModeWordWrap if you want the text to wrap to more lines if it doesn't fit. Else, try increasing the width of your label.

这篇关于想在自定义单元格标签中显示多行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆