Singularity of setHidden function with tableView object
===

I, 

I try to manage the appearance of a tableView inside a scrollView, when a longTapGesture is recognized. This tableView must disappear when longTapGesture is ended. I use the setHidden function inside two "if" blocks for the appearance and disappearance of the tableView. It work after the first longTapView, but after, the tableView does not appear any more. 

I suppose there's a problem with the setHidden function. Here is my code: 


    -(void)handleLongPress:(UILongPressGestureRecognizer *)gestureRecognizer
    {
    
        if(self.tableView==nil)
        {
            
            NSLog(@"tableView initiee");
            self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(gestureRecognizer.view.center.x - 10, gestureRecognizer.view.center.y - 10, 100, 100)];
            [self addSubview:self.tableView];
        }
        
        self.tableView.layer.cornerRadius = 20.0;
        self.tableView.layer.frame = CGRectInset(tableView.layer.frame, 20, 20);
        
        
        if (gestureRecognizer.state == UIGestureRecognizerStateBegan) {
            [self.tableView setHidden:NO];
            NSLog(@"tableView apparait");
        }
        
        if(gestureRecognizer.state == UIGestureRecognizerStateEnded)
        {
            [self.tableView setHidden:YES];
            NSLog(@"tableView disparait");
        }
    }