문제

I have a UITableView using the UITableViewCellStyleSubtitle style. I have also increased the cell height by using

cell.textLabel.lineBreakMode = UILineBreakModeWordWrap;
cell.textLabel.numberOfLines = 0;

and then calculating the desired height in heightForRowAtIndexPath. However, when the user slides the 'delete' button in, the text in the cell stretches out and overlaps the upper and lower edges of the cell. How can I truncate the text like it would if I used the default cell style? (or alternatively, could i change the cell height again possibly?)

도움이 되었습니까?

해결책

The answer was

cell.textLabel.numberOfLines = textLabelheight/textLabelFontSize;
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top