0
得到的代码,但detailText仅在第一“列”表示的情况下,0Detailtext仅在第一个标签表示
代码是下:的cellForRowAtIndexPath
if (indexPath.row == 0) {
cell.detailTextLabel.text = @"A";
}
}
else if (indexPath.row == 1){
cell.detailTextLabel.text = @"B";
}
else if (indexPath.row == 2){
cell.detailTextLabel.text = @"C";
}
else if (indexPath.row == 3){
cell.detailTextLabel.text = @"D";
}
'characterAtIndex:'返回一个'unichar',而不是'NSString',所以不起作用。在这种情况下,你会使用'substringWithRange:'。 – omz 2011-12-18 20:42:03
@omz好的,我已经更新了我的答案。 – 2011-12-18 20:49:56