7

Is there a way to present a modal view controller that doesn't cover the tab bar of a UITabBarController?

Specifically I want to use the UIModalTransitionStylePartialCurl, but preserve the bottom bar, a la the iPhone maps app.

Frank Schmitt
  • 25,648
  • 10
  • 58
  • 70

2 Answers2

0
  1. Have two view controllers
  2. In the first have the second as a subview
  3. Add your toolbar as a subview to the first and call bringSubviewToFront:
  4. Present the modal in the second
ThE uSeFuL
  • 1,456
  • 1
  • 16
  • 29
-2

UIModalTransitionStylePartialCurl When the view controller is presented, one corner of the current view curls up to reveal the modal view underneath. On dismissal, the curled up page unfurls itself back on top of the modal view. A modal view presented using this transition is itself prevented from presenting any additional modal views.

And

hidesBottomBarWhenPushed A Boolean value indicating whether the bar at the bottom of the screen is hidden when the view controller is pushed on to a navigation controller.

@property(nonatomic) BOOL hidesBottomBarWhenPushed

Discussion

If YES, the bar at the bottom of the screen is hidden; otherwise, NO. If YES, the bottom bar remains hidden until the view controller is popped from the stack.

There are discussions around this topic on stackoverflow in the past

Community
  • 1
  • 1
karlcow
  • 6,977
  • 4
  • 38
  • 72
  • 1
    This does not work. If you set `hidesBottomBarWhenPushed` to `NO` and present it modally with style `UIModalTransitionStylePartialCurl`, it still curls the toolbar up. – Adam Ernst Jan 25 '12 at 21:36