点击TableView键盘消失且不影响cell的点击效果
UITapGestureRecognizer *gestureRecognizer2 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(hideKeyboard)];
gestureRecognizer2.numberOfTapsRequired = 1;
gestureRecognizer2.cancelsTouchesInView = NO;
[_tableView addGestureRecognizer:gestureRecognizer2];
网友评论