-
Notifications
You must be signed in to change notification settings - Fork 485
UIAlertController is hidden behind the shadow. #110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hello @Salmancs43, sadly, nothing can be done at the moment. But there's hope, next version will ship with proper support of window levels. |
I've always believed that Here's a possible way to achieve what, from the top of my head (untested). let window = UIWindow(frame: UIScreen.main.bounds)
let dummyViewController = UIViewController()
dummyViewController.view.backgroundColor = UIColor.clear
window.rootViewController = dummyViewController
window.windowLevel = UIWindowLevelNormal + 2
// Instructions doesn't use a key window, but the alert probably should.
window.makeKeyAndVisible()
dummyViewController.present(alertViewController, animated: true, completion: nil) After the alert is dismissed, we'll probably need to make sure that the key window is again the main window, and not the one used by Instructions. It's most likely done automatically, but I haven't checked. |
It Can be achieved using this code. |
Problem solved! |
perfect! |
Hi When i present the UIAlertController it is showing behind the overlay. Is there any suggestion for that? Thanks

The text was updated successfully, but these errors were encountered: