Magnifying glass shows UIWindow behind

╄→尐↘猪︶ㄣ 提交于 2019-12-10 15:55:17

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!