我正在尝试将自定义 UIView 的触摸传递到下面的 UITableView(UIView 直接位于 UITableView 的顶部)。但是,它似乎不起作用。
在我的自定义 UIView 中,我尝试了以下所有方法(我使用 touchesMoved 作为示例,但我已经为所有 4 种触摸方法实现了这一点)
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
[self.nextResponder touchesMoved:touches withEvent:event];
}
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { [super
touchesMoved:touches withEvent:event];
}
我什至尝试将指向 UITableView 的指针直接传递到自定义 UIView 并执行以下操作:
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
[self.myTableView touchesMoved:touches withEvent:event];
}
这些选项似乎都没有做任何事情,因为我无法滚动 UITableView。任何想法为什么这不起作用?