I am wanting to hide the UINavigationBar that automatically loads with the Navigation project for the first view only and am wondering how I can make this work.
I have tries to do it like this
//RootViewController.m
#import "mydelegate.h" //-- this is where the view controller is initialized
//...
- (void)viewDidLoad
{
[super viewDidLoad];
navigationController *navController = [[navigationController alloc] init];
[navigationController setNavigationBarHidden:YES animated:animated];
}
//.....
However I am getting errors because I guess I am not calling navigationController across from the delegate file properly or this is just not possible to call it like you would a method from another class.
Any help would be greatly appreciated.
Are you accessing the correct instance of the UINavicationController?
You can access the UINavigationController via self.navigationController from any UIViewController that’s been added to its stack.
Otherwise, maybe this’ll help:
iPhone hide Navigation Bar only on first page