My app has two windows, mainWindow (for almost all views) and loginWindow (just for login view).
When applicationDidEnterBackground I switch mainWindow with loginWindow:
[self.loginWindow makeKeyAndVisible];
[self.mainWindow setHidden:YES];
When I came back in app the loginWindow with its views is shown. That works just fine.
However I have a problem with modalView presentation in mainWindow.
After applicationDidEnterBackground windows are switched again. After going back to mainWindow the modalView is not visible.
Method self.modalViewController gives me the exact modalView that was presented earlier, but is not visible anymore.
I’ve tried to show this modalView again with no luck like this:
[self presentModalViewController:self.modalViewController animated:NO];
How can I “re-present” this hidden modalView again?
Probably you need some logic here. Like Crio stated, dismiss it when entering the background, but remember it in a property or smth. else.