Open qasimsqm opened 7 years ago
@qasimsqm Seems the window is getting hidden when you call show
.You can fix this by immediately calling
UIApplication.shared.delegate?.window??.makeKeyAndVisible()
UIApplication.shared.delegate?.window??.isHidden = false
right after calling show
Same here w/ Objective-C. I did not have time to properly bisect yet, but a known-good version is ref ccb3cb494e4bd1873aefaccb3baf3c9a6c41309c.
Seems that the same problem here https://github.com/Friend-LGA/LGAlertView/issues/34
Please, attach some demo project with the reproducible issue. If I have time, I will take a look.
The problem seems to be in LGAlertViewHelper.h, the app window is not necessarily the first window. In my case there are "hosted" windows which are created by AVPlayerViewController before the app window.
So you can try to replace :
+ (UIWindow *)appWindow {
return [UIApplication sharedApplication].windows[0];
}
with :
+ (UIWindow *)appWindow {
return [UIApplication sharedApplication].delegate.window;
}
Please, attach some demo project with the reproducible issue. If I have time, I will take a look.
I don't use a storyboard and have this block in application:(UIApplication *)application didFinishLaunchingWithOptions:launchOptions:
:
self.window = UIWindow(frame: UIScreen.main.bounds)
let initialVC = InitialViewController.init()
window!.rootViewController = initialVC
window!.makeKeyAndVisible()
That's how I can reproduce the issue and this works for me as a workaround: https://github.com/Friend-LGA/LGAlertView/issues/35#issuecomment-329462957
Following warning appears on console while running <UIVisualEffectView 0x7f8883c2bc70> is being asked to animate its opacity. This will cause the effect to appear broken until opacity returns to 1. Once I show LGAlertView it turns screen into black screen. Following code is used