开发者

Is it possible to hide the Nav Bar on a UISplitViewController?

开发者 https://www.devze.com 2023-01-23 03:10 出处:网络
I have a very simple app that I want to use a UISplitViewController in. It\'s so simple that I don\'t want the NavigationBar visible in portrait because there is no navigation in the left pane. (I do

I have a very simple app that I want to use a UISplitViewController in. It's so simple that I don't want the NavigationBar visible in portrait because there is no navigation in the left pane. (I do want to show it in portrait for开发者_如何学Python the Popover to appear from. However, I don't seem able to hide it. Is the top element even a Nav Bar?

I've tried both of these:

[[splitViewController navigationController] setNavigationBarHidden:YES animated:NO];

for(UIViewController* vc in [splitViewController viewControllers]) {
    [[vc navigationController] setNavigationBarHidden:YES animated:NO];

}

But neither works.


you try this:

source code: https://github.com/mattgemmell/MGSplitViewController/

it helpful for hide the nav bar on a SplitViewController

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号