Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/25.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 UItableView访问按钮错误_Iphone_Objective C_Uitableview_Row - Fatal编程技术网

Iphone UItableView访问按钮错误

Iphone UItableView访问按钮错误,iphone,objective-c,uitableview,row,Iphone,Objective C,Uitableview,Row,你好,我有个问题 I implement this method - (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath: NSIndexPath *)indexPath { NSLog(@"Row=%i",indexPath.row); } 如果我运行应用程序并在第二行的Disclosure按钮上单击tab,则输出为“0”。如果我在第二行(不是

你好,我有个问题

I implement this method
 - (void)tableView:(UITableView *)tableView    accessoryButtonTappedForRowWithIndexPath: NSIndexPath *)indexPath
     {
     NSLog(@"Row=%i",indexPath.row);
     }
如果我运行应用程序并在第二行的Disclosure按钮上单击tab,则输出为“0”。如果我在第二行(不是“披露”按钮)上单击tab,则输出为“1”(如aspected所示)。该错误仅出现在第二行中的一行,其他所有行都可以正常工作

我如何解决这个问题?
谢谢

点击单元格本身(而不是附件)甚至不应该触发此事件,因此还会有更多的事件发生。请确保点击正确的单元格显示按钮。是否使用分段表视图?