一个小坑,tap收走tablevew的didSelect

UITapGestureRecognizer*tap = [[UITapGestureRecognizeralloc]initWithTarget:selfaction:@selector(tapAction)];

tap.numberOfTapsRequired=1;

tap.numberOfTouchesRequired=1;

[self.tableView addGestureRecognizer:tap];



-(void)tapAction

{

[self.tableView endEditing:yes];

}

}


-(void)tableView:(UITableView*)tableView didSelectRowAtIndexPath:(NSIndexPath*)indexPath

{

DebugLog(@"did select");

//OrderModel *model = self.modelArr[indexPath.section];

ComIndentModel*model =self.comIndentModelArray[indexPath.section];

if([model.invalidFlagisEqualToString:@"C1"] || [model.invalidFlagisEqualToString:@"C2"] || [model.invalidFlagisEqualToString:@"C3"]) {

return;

}

DetailViewController*vc = [[DetailViewControlleralloc]init];

vc.appNo= model.appNo;

[self.navigationControllerpushViewController:vcanimated:YES];

}


两者冲突,致使didSelect不起作用

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容