redth-org / BTProgressHUD

Port to Xamarin.iOS of the SVProgressHUD
Other
118 stars 64 forks source link

Crash: Window.Level not normal #66

Closed mh05 closed 3 years ago

mh05 commented 6 years ago

When you are truing to used the progress bar and your top level is not normal.The application will throw an system.null exception

Fix:

 var window = UIApplication.SharedApplication.Windows.FirstOrDefault();
                    if (window == null)
                        return;
                    window.WindowLevel = UIWindowLevel.Normal;

Could you please add this code in show methode

Cheesebaron commented 3 years ago

I don't believe that we should be modifying the Window level. That seems like an odd side-effect of showing a hud.