在UIView中添加了UITapGestureRecognizer和UITableView,然后发现在点击UItableView的cell时,无法点击选中,经查阅资料发现:
//添加回收手势
_backTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(backTapAction)];
[self.view addGestureRecognizer:_backTap];
//遵守协议,添加代理
_backTap.delegate = self;
#pragma mark 回收手势
- (void)backTapAction {
NSLog(@"back");
//移除手势
[self.view removeGestureRecognizer:_backTap];
[UIView animateWithDuration:1.0 animations:^{
//回收导航菜单
CGRect frame = _navigationVc.menuView.frame;
frame.origin.x -= 195;
_navigationVc