Iphone 两个视图可以处理一次触摸吗?
比如说,我有两个重叠的UIView层:Iphone 两个视图可以处理一次触摸吗?,iphone,uiview,Iphone,Uiview,比如说,我有两个重叠的UIView层: ----view-top --view-below 当我触摸屏幕时,我希望触摸由这两个视图处理,而不仅仅是一个视图 我该怎么做呢?试试这个: - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { [self.nextResponder touchesBegan:touches withEvent:event]; } 这会将触摸发送到链中的下一个响应者,在这种情况
----view-top
--view-below
当我触摸屏幕时,我希望触摸由这两个视图处理,而不仅仅是一个视图
我该怎么做呢?试试这个:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
[self.nextResponder touchesBegan:touches withEvent:event];
}
这会将触摸发送到链中的下一个响应者,在这种情况下,是您的视图 试试这个:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
[self.nextResponder touchesBegan:touches withEvent:event];
}
这会将触摸发送到链中的下一个响应者,在这种情况下,是您的视图 你试过吗?你如何处理触摸?触摸开始/。。。或者手势识别器?你试过吗?你如何处理触摸?触摸开始/。。。还是手势识别器?