如何在iphone的表格单元格中显示多行文本?

时间:2020-12-13 10:44:07

I am new to iphone development.I am parsing a xml file and displaying the title, date, view and summary in each row of a table.The contents of summary is big ,so only first 3 words are displayed in the cell. I increased the height of the row.Still 3 words are displayed in my cell.How summary should fit properly inside the cell and full content should be displayed.Please help me out.Thanks.

我是iphone开发新手。我正在解析一个xml文件,并在表的每行中显示标题、日期、视图和摘要。摘要的内容比较大,所以在单元格中只显示前3个单词。我增加了这一行的高度。仍然有3个词显示在我的单元格中。如何在单元格中适当地放置摘要和显示完整内容。请帮我out.Thanks。

1 个解决方案

#1


6  

why dont you set the "numberOfLines" property of the text label of a cell to 0.

为什么不将单元格的文本标签的“numberOfLines”属性设置为0呢?

just like this,

就像这样,

cell.textLabel.numberOfLines=0;

Good Luck.

祝你好运。

#1


6  

why dont you set the "numberOfLines" property of the text label of a cell to 0.

为什么不将单元格的文本标签的“numberOfLines”属性设置为0呢?

just like this,

就像这样,

cell.textLabel.numberOfLines=0;

Good Luck.

祝你好运。