We're currently migrating from the deprecated UIAlertView
to UIAlertController
.
Our application can react the certain external events (such as push notifications, bluetooth communication, background network responses) and as a result of those events it can present at any moment a new UIViewController
on top of the top most view controller.
However, since migrating to UIAlertController
, we've encountered scenarios where an UIAlertController
is presented right before another UIViewController
should be presented, since they are triggered by different events.
Since we're relying on the top most view controller, this means that the UIAlertController
will present another UIViewController
instance, which isn't what we want, because the UIAlertController
is not visible any longer.
Is there a way to keep presenting the UIAlertController
at the window level, just like the deprecated UIAlertView
works?
In this way we would make sure that the UIAlertController
is always on top and it can't actually present another UIViewController
.
Thank you, Cosmin