Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 如何向表视图添加复选标记?_Iphone_Objective C_Checkmark - Fatal编程技术网

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];

}

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

事实上,我想出来了,这是正确的方法,只是它有一个黑色背景,所以很难看到