一个小坑,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不起作用

你可能感兴趣的:(一个小坑,tap收走tablevew的didSelect)