UITableView嵌入在UIScrollView中,滑动删除不起作用

时间:2016-02-20 09:07:02

标签: ios uitableview uiscrollview

我尝试了很多方法,但没有得到解决方案

就我而言,我的视图层次结构:

UIView
  UIScrollView
  LeftContainer + RightContainer
                (in RihgtContainer) ViewContainer 
                                      TableView

enter image description here

我试过这些:

继承Scrollview和

 - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
    [self.nextResponder touchesBegan:touches withEvent:event];
}

- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
   if(!self.dragging)
    {
        [self.nextResponder touchesMoved:touches withEvent:event];
    }
}

- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
    [self.nextResponder touchesEnded:touches withEvent:event];

}

- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer


innerTableView.scrollEnabled = YES;
innerTableView.alwaysBounceVertical = NO;

1 个答案:

答案 0 :(得分:0)

您可以托盘将滚动浏览中的delaysTouchesBegan设置为true ...就像这里https://stackoverflow.com/a/31040918/1702413

.. UITableview继承自UIScrollView

您不应在UIWebView个对象https://stackoverflow.com/a/17121582/1702413中嵌入UITableViewUIScrollView个对象