如何防止在使用UITableViewCellStyleValue1时截断textLabel?

当UITableViewCell与UITableViewCellStyleValue1样式一起使用时,当detailTextLabel非常长时,textLabel.text被截断。
static NSString *CellIdentifier = @"Cell";
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:CellIdentifier] autorelease];

cell.textLabel.text = @"Publisher";
cell.detailTextLabel.text = @"This Is A Very Long String";
所以问题是如何强制显示“Publisher”而不会截断regrudess的detailTextLabel长度? 附:我是这个社区的新手,所以我无法发布可以更好地澄清问题的图像。对不起...     
已邀请:
你试过
[cell.detailTextLabel setNumberOfLines:0];
也许它有效。     
如果您正在主动更改单元格的文本,那么它可能会被截断,因为尽管有足够的空间,标签仍未扩展。您可以在更改文本后调用
[cell setNeedsLayout]
来修复该特定问题。     

要回复问题请先登录注册