0
votes

In my app I have two Tabbar items A and B. From A view controller I have presented another view controller C under current context of view controller A so that presented view controller doesn't cover the fullscreen and UITabbar is visible. Then, when I select second tabbar item and switch back to first and dismiss the presented view controller, Current Tabbar item turns to back.

I have shared the demo example. Please follow the steps to regenerate the bugs.

  1. Run the app
  2. Press "Present C" button
  3. Select Bookmarks Item
  4. Select back to Top Rated Item
  5. Press "Dismiss" button**

Observation: Black screen Expectation: View Controller in that Tabbar Item should be visible.

1

1 Answers

0
votes

Normally, a modal view controller in this context would be used to perform some action related to that tab, and should be dismissed while still in that tab [Designed behaviour, otherwise behaves weird. If you use view debugger you will see there is no view controller in the tab after you dismiss the presented view], So use modal presentation style overFullScreen, which will hide tab bar. If you really need that view (the one you're modally presenting) to stay visible, you might want to use a navigation controller as the root for that tab, and do a push instead. Bellow link holds these answers for you..

Black screen after presenting modal view controller in current context from UITabBarController