annexButtonTappedForRowWithIndexPath:没有被调用 [英] accessoryButtonTappedForRowWithIndexPath: not getting called
问题描述
我正在创建一个使用数组填充的详细信息显示"按钮....但是,在我的类中未调用attachmentButtonTappedForRowWithIndexPath:函数.它是TableviewDelegate
和TableviewDatasource
委托.
I am creating a Detail disclosure button which is getting populated using an array.... However the accessoryButtonTappedForRowWithIndexPath: function is not being called in my class. It is a TableviewDelegate
and TableviewDatasource
delegate.
- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath{
NSLog(@"reaching accessoryButtonTappedForRowWithIndexPath:");
[self performSegueWithIdentifier:@"modaltodetails" sender:[self.eventsTable cellForRowAtIndexPath:indexPath]];
}
NSLog没有打印到控制台,这使我相信该函数没有被调用...这当然是在单元格上选择时.下面的屏幕截图显示了我如何设置单元格.
The NSLog isnt printing to console which leads me to believe the function isnt being called... This is of course when I select on a cell. A screenshot below shows how I have my cell setup.
推荐答案
您只是单击该单元格以选择它,还是您实际上单击了该单元格上的附件按钮指示器?您的问题不清楚.
Did you just click on the cell to select it or did you actually click on the accessory button indicator on the cell? It isn't clear from your question.
accessoryButtonTappedForRowWithIndexPath
仅在单击单元格中的按钮图标时适用,而不是在选择单元格时适用.
accessoryButtonTappedForRowWithIndexPath
is applicable when you click on the button icon within the cell and not when you select the cell.
这篇关于annexButtonTappedForRowWithIndexPath:没有被调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!