如何在表格视图中添加复选标记?

时间:2010-06-09 20:05:52

标签: iphone objective-c checkmark

我已经输入了这段代码:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {

     UITableViewCell * tableCell = [self.tableView cellForRowAtIndexPath:indexPath];

     tableCell.accessoryType = UITableViewCellAccessoryCheckmark;
     [tableView deselectRowAtIndexPath:(NSIndexPath *)indexPath animated:YES];

}

但出于某种原因,没有出现复选标记。有人可以帮忙吗?

1 个答案:

答案 0 :(得分:0)

实际上,我想通了,这是正确的做法,只是它有一个黑色的bg所以很难看到。

相关问题