LGAlertView
LGAlertView copied to clipboard
Don't manipulate non-app windows
The lib always hides my non-app key window that I use for my custom controller in action sheet style that I use for photo picker.
UIWindow *keyWindow = LGAlertViewHelper.keyWindow;
[keyWindow endEditing:YES];
if (!hidden && keyWindow != LGAlertViewHelper.appWindow) {
keyWindow.hidden = YES;
}
/* if (!hidden && keyWindow != LGAlertViewHelper.appWindow) { keyWindow.hidden = YES; } */
When i have two windows. One with window?.windowLevel = UIWindowLevelNormal
, other with UIWindowLevelNormal - 1
. After
if (!hidden && keyWindow != LGAlertViewHelper.appWindow) {
keyWindow.hidden = YES;
}
the screen becomes black. So i want to ask why is this necessary to hide a key window?
After some ivestigation this feature was added in https://github.com/Friend-LGA/LGAlertView/commit/d99e2ec97c5ffa5b07a7f0ee08861d8187fa447d So if you have the same bug, you can use 2.3.0 version, it works well.
Fun stars count has this repo now =)
IIRC it needs to work properly together with other alert views. For example if you occasionally get some system alert view while showing LGAlertView.
You can check Alerts Cycle
and Mix of Alerts
options in demo project. If you have another ideas for workaround, it will be good to have it.
Please, attach some demo project with the reproducible issue. If I have time, I will take a look.
UIAlertController doesn't use separate window for presentation so hiding of key window doesn't resolve issues you mentioned.
Also this line is causing a black screen appear (window hiding) in iPad.