Can I hide the Nav panel on a UISplitViewController?

I have a very simple application in which I want to use the UISplitViewController. It is so simple that I do not want the NavigationBar to be visible in the portrait, because there is no navigation in the left pane. (I want to show it in the portrait for Popover so that it appears. However, I cannot hide it. Is even the Nav panel the top element?

I tried both of them:

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

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

}

But does not work.

+3
source share
1 answer

try the following:

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

useful to hide navigation bar on SplitViewController

0

Source: https://habr.com/ru/post/1772889/


All Articles