Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I remove the UINavigationBar from a UIViewController?

I'm experimenting with the NavBar sample project for iPhone. When I tap on one of the rows in the table in the default view a new view slides in (so far so good). I want to remove the UINavigationBar bar at the top of the new view that slides in. How can I do this?

EDIT: I meant "UINavigationBar". Thanks to everyone who responded!

like image 653
MrDatabase Avatar asked Oct 25 '08 23:10

MrDatabase


1 Answers

Are you referring to the status bar (where the time and battery status are shown) or the UINavigationBar (where the title and Back buttons are)?

  • To hide the status bar, use [UIApplication sharedApplication].statusBarHidden = YES; in your -applicationDidFinishLaunching: method.

  • To hide the UINavigationBar, you'll want to use the navigationBarHidden property of your UINavigationController.

like image 100
Ben Gottlieb Avatar answered Oct 03 '22 09:10

Ben Gottlieb