Reputation: 282
I am presenting a viewcontroller
modally and am trying to configure it where, when I re-enter the foreground after going to the background (i.e. I click a website link that redirects me out fo the app and then I navigate back to the app), I don't want the presented viewcontroller
to be dismissed.
Is the only option to create a navigationcontroller
stack? Hoping for a solution without this, and I couldn't find any existing commentary around this/am fairly new to all this. Any advice would be helpful.
My view hierarchy is...
Root MainTabBarVC
Load DummyMenuVC into MainTabBarVC viewcontrollers
Present on shouldSelect
tabBarControllerDelegate method RealMenuVC
Tap RealMenuVC Button to present NextVC
I have #2 & #3 to be able to interact with the menu over the full context of any tabBarItem
selected.
Upvotes: 0
Views: 1763
Reputation: 45
this solution work for me
modalPresentationStyle = .overCurrentContext
Upvotes: -1
Reputation: 282
Learned a presented vc isn't dismissed just because it goes into the background mode, and that something must have been programmatically integrated to trigger it.
I traced my issue to a notificationCenter observer I had included, which invoked a function that dismissed presented vcs.
Upvotes: 2