indexPathForSelectedRow returning nil

来源:互联网 发布:js给span标签赋值 编辑:程序博客网 时间:2024/05/19 16:37

 

大概是因为多个section的原因,具体没细究,stackoverflow上也没有好的回答。但要是为了获取cell,大可不必用indexPathForSelectedRow,可用下面的方式

NSIndexPath *currentClickIndexPath = [NSIndexPath indexPathForRow:view.tag inSection:1];

    SHVoiceCell2 *cell = [self.tableView cellForRowAtIndexPath:currentClickIndexPath];

具体原因还会研究,先忙项目了

原创粉丝点击