Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
说,我有两个重叠的 UIView 层:
----view-top --view-below
当我触摸屏幕时,我希望通过这两个视图来处理触摸,而不仅仅是一个。
我怎样才能做到这一点?
尝试这个:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { [self.nextResponder touchesBegan:touches withEvent:event]; }
这会将触摸发送到链中的下一个响应者,在这种情况下,是您的视图!