In my application, I need to remove any warnings visible in the window when the application switches to background.But the problem is that I do not want to reject it with
[alert dismissWithClickedButtonIndex:0 animated:YES]
because it will call the delegate clickedButtonAtIndexand call the method. I will not avoid this when the application goes into the background.
I did this successfully by removing alertView from the subViews of the windowusing the following code
for (UIWindow *window in [UIApplication sharedApplication].windows) {
for (UIView *view in [window subviews]) {
if ([view isKindOfClass:[UIAlertView class]]) {
[view removeFromSuperview];
}
}
But the problem is that _UIAlertNormalizingOverlayWindow is still there, and this blocks Interaction.I user needs to remove _UIAlertNormalizingOverlayWindow from my window as well. Please help me do this or suggest any alternatives to reach a solution.
source
share