From 1dbbddc9fa2f6952712c37dccdb3c49986c2f9f8 Mon Sep 17 00:00:00 2001 From: apple <245185601@qq.com> Date: Mon, 1 Jul 2019 14:46:53 +0800 Subject: [PATCH] fix the issue of UI Frezze https://github.com/AssistoLab/KVNProgress/issues/115 --- KVNProgress/Classes/KVNProgress.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/KVNProgress/Classes/KVNProgress.m b/KVNProgress/Classes/KVNProgress.m index 61357f8..a748a2e 100644 --- a/KVNProgress/Classes/KVNProgress.m +++ b/KVNProgress/Classes/KVNProgress.m @@ -916,7 +916,9 @@ - (void)setupMotionEffect - (void)addToWindow { - self.originalKeyWindow = [UIApplication sharedApplication].keyWindow; + if([UIApplication sharedApplication].keyWindow != self.progressWindow){ + self.originalKeyWindow = [UIApplication sharedApplication].keyWindow; + } if (!self.progressWindow) { self.progressWindow = [[UIWindow alloc] initWithFrame:self.originalKeyWindow.frame];