accessoryButtonTappedForRowWithIndexPath:没有被调用。 [英] accessoryButtonTappedForRowWithIndexPath: not getting called.

查看:293
本文介绍了accessoryButtonTappedForRowWithIndexPath:没有被调用。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个详细信息披露按钮,它正在使用数组进行填充....但是,我的类中没有调用accessoryButtonTappedForRowWithIndexPath:函数。它是tableviewdelegate和tableviewdatasource委托。

I am creating a Detail disclosure button which is getting populated using an array.... Howevever 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.

这篇关于accessoryButtonTappedForRowWithIndexPath:没有被调用。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆