在tableView单元格中部分显示标题? [英] Partially displaying the Title in the tableView Cell?
本文介绍了在tableView单元格中部分显示标题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图在其显示的Tableview单元格中显示标题数据,但部分(...)我想在表格单元格中显示完整标题可能在两行或三行中,我使用了自定义单元格并使用了标签并设置标签属性,但仍显示部分数据
I'm tried to display the Title Data in the Tableview Cell it displayed but partially (...) i want to display full title in the table cell may be in two or three line i used customize cell and use the label and set label property but still data displayed partially
titleLabel.text = aNewsInfo.title;
有人能建议我克服这个问题的方法吗?
Can any one suggest me the way to overcome this prob...
预先感谢...
推荐答案
尝试以下代码:
myLabel.lineBreakMode = UILineBreakModeWordWrap;
myLabel.numberOfLines = 2; // 2 lines ; 0 - dynamical number of lines
myLabel.text = @"Lorem ipsum dolor sit\namet...";
这篇关于在tableView单元格中部分显示标题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文