문제

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top