From 0d307dac3a38ed70ce93feba01745fe6c9e2b4a8 Mon Sep 17 00:00:00 2001 From: coldmint Date: Thu, 17 Nov 2016 01:08:28 +0300 Subject: [PATCH] update UIWindow choice --- KLCPopup/KLCPopup.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/KLCPopup/KLCPopup.m b/KLCPopup/KLCPopup.m index f297cce..1d2cd4f 100644 --- a/KLCPopup/KLCPopup.m +++ b/KLCPopup/KLCPopup.m @@ -534,7 +534,7 @@ - (void)showWithParameters:(NSDictionary*)parameters { if(!self.superview){ NSEnumerator *frontToBackWindows = [[[UIApplication sharedApplication] windows] reverseObjectEnumerator]; - for (UIWindow *window in frontToBackWindows) { + for (UIWindow *window in frontToBackWindows && !window.hidden) { if (window.windowLevel == UIWindowLevelNormal) { [window addSubview:self];