user2289379
user2289379

Reputation:

How can i hide or remove UINavigationController?

I want to access all the feature that provide by UINavigationController.In MY Application i need to remove/hide UINavigationController from my FirstViewController. When my FirstViewController will display then UINavigationController is not display and FirstViewController has UITableView. I can select row from UITableView and display another UIViewController and then display UINavigationController and I can go back through UINavigationController.

How do I do it?

Upvotes: 0

Views: 316

Answers (2)

Anshuk Garg
Anshuk Garg

Reputation: 1540

add this in viewDidLoad of the viewController u need to hide navigation bar

[self.navigationController setNavigationBarHidden:YES animated:NO];

and in the same viewController add

[self.navigationController setNavigationBarHidden:NO animated:NO];

in - (void)viewDidDisappear:(BOOL)animated

hope it helps. happy coding :)

Upvotes: 0

Srikar Appalaraju
Srikar Appalaraju

Reputation: 73588

Yes you can do it. You need to hide the navigationBar of the navigationController. This way the navigationController is completely hidden but you can still access it to push and pop viewControllers.

self.navigationController    = [[UINavigationController alloc] init];
[self.navigationController setNavigationBarHidden:YES animated:NO];


SomeViewController *sVC = [[[SomeViewController alloc] initWithNibName:@"SomeViewController" bundle:nil] autorelease];
[self.navigationController pushViewController:sVC animated:NO];

Upvotes: 1

Related Questions