在 iOS9.1 中,当我通过 removeFromSuperView 删除自定义 UIWindow 并将其设置为 nil 时,它不会自动消失,直到单击该窗口。并显示错误
_UIApplicationHandleEventFromQueueEvent、_windowServerHitTestWindow 中的意外零窗口:(空)
在 iOS9 及更低版本中,它可以正常工作。
UIWindow *window = [target associatedValueForKey:lock_window];
if (window) [window removeFromSuperview];
[target associateValue:nil withKey:lock_window];