samedi 27 juin 2015

iOS navigation controller without navigation bar

This is how I launched by main controller in my iOS app.

UIViewController *rootController = [[RootViewController alloc] init];
navigationController = [[UINavigationController alloc] initWithRootViewController:rootController];

self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
[self.window setRootViewController:navigationController];
[self.window makeKeyAndVisible];
return YES;

With this I am getting a blank bar at the top.

enter image description here

I want to use a navigation controller to control the flow of screens that users are able to reach by pressing back but I don't want a navigation bar. How can I change my code to get what I want?

Aucun commentaire:

Enregistrer un commentaire