[英]GSevent/UITouch penetrate top layer UIWindow to act on another UIWindow (iOS, theos, jailbreak)
A和B是2 UIWindow,B具有更高的UIWindowLevel。
現在我希望B對UITouch事件“透明”-
當我觸摸UIWindow B內的一個點時,UIWindow A將收到touch事件。
我怎么做? 是否有可能通過掛鈎某些ios類來實現?
+-------------------+
| A |
| +--------+ |
| | B | |
| | | |
| +--------+ |
| |
+-------------------+
在“透明” UIView
嘗試以下覆蓋:
- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event
{
return NO;
}
一種替代方法是以下替代:
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
{
return self.superview;
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.