如果 textlabel 文本超过 2 行,我需要怎么做才能获得省略号?我已经在下面的屏幕截图中指出了问题,然后是设置 textLabel 属性的代码。感谢您的关注!
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
//...
cell.textLabel.font = [UIFont boldSystemFontOfSize:16];
cell.textLabel.numberOfLines = 2;
cell.textLabel.lineBreakMode = UILineBreakModeWordWrap;
cell.textLabel.text = [self.selectedSubject subject];
cell.detailTextLabel.text = @"May 21st, 2012";
return cell;
}