我在屏幕顶部添加了一个 UIView / UIWindow。
UIWindow *statusBarWindow = [[UIWindow alloc] initWithFrame:[UIApplication sharedApplication].statusBarFrame];
statusBarWindow.windowLevel = UIWindowLevelStatusBar + 1;
statusBarWindow.userInteractionEnabled = NO;
[statusBarWindow makeKeyAndVisible];
但是这些视图不应该是可触摸的,并且触摸它应该触发对这些视图下方的触摸。现在,当我添加此视图时,触摸没有通过,并且没有任何反应。
如何让 UIView/UIWindow 不处理触摸事件?
我试过.userInteractionEnabled = NO
了,但没有用。谢谢!