A和B为2 UIWindow,且B具有较高的UIWindowLevel。
现在我希望B对UITouch事件是“透明的”--
当我触摸UIWindow B内部的一个点时,UIWindow A将收到触摸事件。
我该怎么做?有没有可能通过连接一些ios类来实现这一点?
+-------------------+
| A |
| +--------+ |
| | B | |
| | | |
| +--------+ |
| |
+-------------------+发布于 2013-08-08 23:49:48
在“透明”UIView中尝试以下重写
- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event
{
return NO;
}另一种替代方法是以下替代:
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
{
return self.superview;
}https://stackoverflow.com/questions/18130444
复制相似问题