开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜