在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...";