This is a very naive way to look at windows and controllers in this day and age. There are many cases where this assumption is incorrect. Another problem would be calling your alert method multiple times.
The more correct way would be to display the alert controller on top of a clear root controller in a window of its own. Then you enter into the territory of managing multiple alerts displayed one after the other. And lo and behold, your have implemented _UIAlertControllerShimPresenter and _UIAlertControllerShimPresenterWindow, the internals of the now deprecated UIAlertView.
This is a very naive way to look at windows and controllers in this day and age. There are many cases where this assumption is incorrect. Another problem would be calling your alert method multiple times.
The more correct way would be to display the alert controller on top of a clear root controller in a window of its own. Then you enter into the territory of managing multiple alerts displayed one after the other. And lo and behold, your have implemented
_UIAlertControllerShimPresenter
and_UIAlertControllerShimPresenterWindow
, the internals of the now deprecatedUIAlertView
.