尝试了很多方法都没有解决
就我而言,我的 View 层次结构:
UIView
UIScrollView
LeftContainer + RightContainer
(in RihgtContainer) ViewContainer
TableView
我试过这些:
子类化 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;
最佳答案
您可以通过托盘将 ScrollView 上的 delaysTouchesBegan
设置为 true
... 就像这里 https://stackoverflow.com/a/31040918/1702413
但是 ..
UITableview
继承自UIScrollView
您不应在 UIScrollView
对象中嵌入 UIWebView
或 UITableView
对象 https://stackoverflow.com/a/17121582/1702413
关于ios - 一个 UITableView 嵌入了一个 UIScrollView,滑动删除是行不通的,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35521168/