AssistoLab / KVNProgress

KVNProgress is a fully customizable progress HUD that can be full screen or not.
MIT License
1.24k stars 202 forks source link

UIWindow #86

Open pjebs opened 8 years ago

pjebs commented 8 years ago

@kevin-hirsch Even after I call dismiss(), I've noticed that when I look at the window hierarchy, there is a UIWindow and it's associated KVNRotationViewController still persisting.

Is this normal?

Don't get me wrong. It doesn't seem to affect my app. It's just always there.

kevin-hirsch commented 8 years ago

Hello @pjebs!

Indeed, the window is still in the view hierarchy. The code hide the KVNProgress window and change the keyWindow. This should remove the hidden window from the hierarchy. But since the KVNProgress (singleton) instance is retaining its own window as a property (progressWindow), the window is always retained and thus, never removed from window hierarchy.

I don't think this could cause any problems but it would be better to remove the window from its hierarchy by setting the progressWindow property to nil after dismissing the KVNProgress.

I will work on this.

Thanks for noticing! 👍

pjebs commented 8 years ago

Actually I just noticed that it is causing issues for me now. I use a component called RMUniversalAlert which needs to placed on my Window. Sometimes I can't rely on calling shareApplication.windows.last because it captures the KVN Window.

pjebs commented 8 years ago

@kevin-hirsch Any progress on this issue?

pjebs commented 7 years ago

Can you please remove KVNRotationViewController from the heirarchy because I have various libraries that attempt to put themself on top using code such as: UIApplication.sharedApplication().windows.last?.rootViewController.

That is a common technique that a lot of libraries use. Unfortunately because of KVNRotationViewController always persisting (and invisible when KVProgress is not operating), all of these libraries end up putting their view inside KVNRotationViewController and you can't see anything.

rmvz3 commented 7 years ago

Same here. In certain circumstances the KVN Window remains over the other views making my app unresponsive. Please fix this. Is there a workaround we can use in the meantime?

fadizant commented 6 years ago

screen shot 2018-08-17 at 8 45 56 pm

window appear over main window that make my main window untouchable, any solution for this please.