问题
We have an app with a burger menu navigation, the menu itself is a window that lies behind the keywindow.
When the user long presses a uitextfield and brings up the magnifying glass, the magnifying glass shows the content of the UIWindow behind.
Has anyone got any ideas
Video
回答1:
A workaround for this is setting windowLevel to -1 like
self.navigationWindow.windowLevel = -1;
where navigationWindow is the window containing the menu.
回答2:
I meet the same problems.
My solution is:
UIWindow* oldWindow = [UIApplication sharedApplication].keyWindow;
delegate.newWindow.hidden = NO;
[delegate.newWindow makeKeyAndVisible];
oldWindow.hidden = YES;
it works. But there will be a black twinkle during the transition.
回答3:
Set window?.makeKeyAndVisible()
After window?.rootViewController = whatever
Issue happens with me when I do the opposite
回答4:
Actually your application UIWindow::windowLevel property (window z-index) is 0 by default. Your login UIWindow::windowLevel is also 0 by default.
Adjust your login window level
loginWindow.windowLevel = UIWindowLevelAlert
来源:https://stackoverflow.com/questions/36692542/magnifying-glass-shows-uiwindow-behind