foreach (UIWindow window in windows) {
if (window.WindowLevel == UIWindowLevel.Normal && !window.Hidden) {
window.AddSubview (OverlayView);
break;
}
}
The issue is because CRSAlertView adds a new window, so in addttion to window.WindowLevel == UIWindowLevel.Normal && !window.Hidden, we must check is is IsKeyWindow, eg: I replaced that code with this:
var window = windows.FirstOrDefault(w => w.WindowLevel == UIWindowLevel.Normal && !w.Hidden && w.IsKeyWindow);
if (window == null)
{
throw new Exception("Can't find a visible key window to add the subview");
}
window.AddSubview(OverlayView);
Hi! I've found an issue. When you use BTProgressHUD togheter with CRSAlertView, it stops showing.
The issue is in ProgressHUD.cs, method void ShowProgressWorker (float progress = -1, string status = null, MaskType maskType = MaskType.None, bool textOnly = false, ToastPosition toastPosition = ToastPosition.Center, string cancelCaption = null, Action cancelCallback = null, double timeoutMs = 1000, bool showContinuousProgress = false, UIImage displayContinuousImage = null)
In this code
The issue is because CRSAlertView adds a new window, so in addttion to window.WindowLevel == UIWindowLevel.Normal && !window.Hidden, we must check is is IsKeyWindow, eg: I replaced that code with this: