1

I have a UITabBarController with five view controllers in it. In one view controller, a button can be pressed to present a new ViewController, but the tabbar is covered. How can I present the controller and keep the tabbar visible?

Henson Fang
  • 1,177
  • 7
  • 30

2 Answers2

3

When you present something, it will cover entire screen.

The controller from where you want to present a new controller, make it as navigation controller rather keeping it as simple controller.

So, you can push the new controller on it rather than you present.

Apurv
  • 17,116
  • 8
  • 51
  • 67
-1
[<presentingViewControllerInstance> setModalPresentationStyle:UIModalPresentationOverCurrentContext];

Use currentContext as presentation style for the presenting view controller before presenting. No need to create a navigation controller and push.

Mukul More
  • 554
  • 2
  • 5
  • 18