我正在尝试添加自定义UIWindow并将事件转发到mainWindow
-(UIView *) hitTest:(CGPoint)point withEvent:(UIEvent *)event{
UIView *hitView = [super hitTest:point withEvent:event];
if (hitView == self.myView) {
return hitView;
}else{
return mainWindow;
}}
在mainWindow.rootViewController.view中传递View时有效 但我想将它传递给mainWindow
答案 0 :(得分:0)
我的问题的解决方案是返回零 它会将它传递给下一个托管窗口
-(UIView *) hitTest:(CGPoint)point withEvent:(UIEvent *)event{
UIView *hitView = [super hitTest:point withEvent:event];
if (hitView == self.myView) {
return hitView;
}else{
return nil;
}}