我有一个UIScrollView,其背景设置为透明。其中一部分scrollview有内容,但另一部分没有(因此它会显示在其后面的其他视图)。我想能够通过UIScrollView并且仅限于UIScrollView透明的部分点击到后面的MKMapView。
我找到了一些代码,但我真的很难理解如何使其工作:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
if (![self yourMethodThatDeterminesInterestingTouches:touches withEvent:event])
[self.nextResponder touchesBegan:touches withEvent:event];
}
有谁能够帮我理解如何将触摸事件转发到位于其他视图后面的视图? 我可以从UIViewController中调用 - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event 吗?