DOOManiac DOOManiac - 2 years ago 96
iOS Question

UINavigationController without navigation bar?

I have a universal app, and on the iPad version I'm using

to create an interface similar to the Mail app.

I was having trouble pushing new Detail views, so I decided to use a
so I could just push and pop views as needed. However, I do not want to use the navigation view or a toolbar. But no matter what I do, I can't hide the navigation bar.

I've tried unchecking "Shows Navigation Bar" in IB, and I've also tried setting:

[self.navigationController setNavigationBarHidden:YES];

in the
. I've also tried it in each of the views that will be pushed. Nothing works.

Is there something I'm missing here? Is it possible to have a
without a toolbar or navigation bar?

Answer Source

You should be able to do the following:

self.navigationController.navigationBar.hidden = YES;

where navController is (obviously) an instance of UINavigationController. Seems to work for me, but I only briefly tested it before posting this.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download