使用以下代码我得到了text.label,但没有得到detailTextLabel.text。 NSLog 显示正确。
cell.textLabel.text = [eventLabels objectAtIndex:indexPath.row];
cell.detailTextLabel.text = [eventFields objectAtIndex:indexPath.row]];
NSLog(@"%@", [eventFields objectAtIndex:indexPath.row]);
我也尝试过...
cell.detailTextLabel.text = [NSString stringWithFormat:@"%@", [eventFields objectAtIndex:indexPath.row]];
我以前没有遇到过这个问题。有什么建议吗?
约翰
最佳答案
确保您使用适当的UITableViewCellStyle
(因此除了UITableViewCellStyleDefault
之外的任何内容都应该有效)。单元格的样式是在初始化时指定的。
关于iphone - cell.detailTextLabel.text 不起作用...为什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2349279/