Search code examples
uiviewcontrolleruikit

UIViewController Double Modal Presentation


I want to do two modal presentations. I have a WorkspaceViewController that displays the main content. There are a handful of screens to load items, save an item and I like to have these pop up as modals. But on top of that I have errors, loading, or warning VC's that I'd like to pop over over all of that. But it seems that UIViewController modal presentations doesn't support this. How can this basic presentation style be accomplished?


Solution

  • You can't present two modals from one UIViewController instance at the time. If you would like to present UIAlertController of top of your modal you can use new UIWindow.

    For details take a look at: How to present UIAlertController when not in a view controller? or ios - present UIAlertController on top of everything regardless of the view hierarchy