Partial Curl Modal Transition Style While Preserving Tool/Tab Bar

非 Y 不嫁゛ 提交于 2019-11-30 03:59:38

问题


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.


回答1:


  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



回答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



来源:https://stackoverflow.com/questions/4494337/partial-curl-modal-transition-style-while-preserving-tool-tab-bar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!