Closed mohibsheth closed 8 years ago
Hi @mohibsheth - sorry for the long delay. Do you have the actual diff? This is showing as a diff of the whole file.
Hi @nicwise - I have made a single line change on Line 809 in ProgressHUD (https://github.com/nicwise/BTProgressHUD/blob/master/BTProgressHUD/ProgressHUD.cs#L809)
CGRect orientationFrame = UIApplication.SharedApplication.KeyWindow.Bounds;
I have made it used KeyWindow because sometimes its possible that the Window is null. Usually happens when you change the RootViewController ;)
Merged in. Thanks!
After the HUD is shown and not dismissed yet, if the Window is changed for some reason, the PositionHUD still tries to get the previous Window's Bounds which is "null".
My solution was to use the KeyWindow instead. You may have a better solution to this.