我有UITableView
个自定义UITableViewCell
这是我的单元格的结构
除了角落红色按钮(Btn删除)之外,我已禁用每个UIButton
的用户交互。我的问题是didSelectRowAtIndex
委托没有解雇。数据加载也在发生我也从代码中设置了委托。
请帮帮我。 感谢
更新
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
NSIndexPath *previousIndexPath = selectedIndexPath;
if (indexPath == selectedIndexPath) {
selectedIndexPath = nil;
} else {
selectedIndexPath = indexPath;
}
NSMutableArray *indexPaths=[[NSMutableArray alloc] init];
NSIndexPath *previous=previousIndexPath;
[indexPaths addObject:previous];
NSIndexPath *current=selectedIndexPath;
[indexPaths addObject:current];
if ([indexPaths count]>0) {
[_tblPendings reloadRowsAtIndexPaths:indexPaths withRowAnimation:UITableViewRowAnimationFade];
}
}