Iphone 如何向表视图添加复选标记?
我已经输入了以下代码:Iphone 如何向表视图添加复选标记?,iphone,objective-c,checkmark,Iphone,Objective C,Checkmark,我已经输入了以下代码: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell * tableCell = [self.tableView cellForRowAtIndexPath:indexPath]; tableCell.accessoryType = UITableViewCellAccessoryCh
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell * tableCell = [self.tableView cellForRowAtIndexPath:indexPath];
tableCell.accessoryType = UITableViewCellAccessoryCheckmark;
[tableView deselectRowAtIndexPath:(NSIndexPath *)indexPath animated:YES];
}
但是由于某种原因,复选标记没有出现。有人能帮忙吗?事实上,我想出来了,这是正确的方法,只是它有一个黑色背景,所以很难看到