Douglas Squirrel
Douglas Squirrel

Reputation: 2324

How do I get rid of the grey bar in UINavigationController (iOS app)

I'm using this code to open up a page in my iOS app when a user clicks a button, but I get a grey bar at the top of the page when the user does so. How can I get rid of this?

- (IBAction) colours:(id)sender   { 
    UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:colourPickerView];
    [self presentViewController:navigationController animated:YES completion: nil];
}

Upvotes: 1

Views: 2461

Answers (3)

user7187501
user7187501

Reputation:

For Swift 4, use the property isNavigationBarHidden.

navigationController.isNavigationBarHidden = true

Upvotes: 1

user1488696
user1488696

Reputation:

You could be referring to the navigation bar created by the navigation controller.

To hide it just use this.

[navigationController.navigationBar setHidden:YES];

Upvotes: 2

Remear
Remear

Reputation: 1937

Assuming you mean the status bar containing the clock and batter indicator, you can do:

[[UIApplication sharedApplication] setStatusBarHidden:NO animated:NO];

Upvotes: 1

Related Questions