The Initial View Controller of this project is a Navigation Controller. I want to show a Tab Bar Controller on a View Controller later in the view hierarchy after the user signs in.
When I embed a Tab Bar Controller on the View Controller I want it to be on, the navigationBar I have programmatically implemented gets overridden with a new navigationBar item that, when pressed, leads the user back to the log in page.
Here is the code for the navigationBar.
self.navigationController.navigationBar.tintColor = [UIColor whiteColor];
//Changes The Title Color
[self.navigationController.navigationBar setTitleTextAttributes:[NSDictionary dictionaryWithObject:[UIColor whiteColor] forKey:NSForegroundColorAttributeName]];
//Sets The Navigation Controller Font
[self.navigationController.navigationBar setTitleTextAttributes:
[NSDictionary dictionaryWithObjectsAndKeys:
[UIColor whiteColor], NSForegroundColorAttributeName,
[UIFont fontWithName:@"ArialMT" size:12.0], NSFontAttributeName,nil]];
[[UINavigationBar appearance] setBarTintColor:UIColorFromRGB(0x0080ff)];
self.navigationController.navigationBar.translucent = YES;
self.navigationItem.leftBarButtonItem = btnRefresh;
//
self.navigationItem.rightBarButtonItem = btnCompose;
Here is how the navigationBar is supposed to be implemented on the View Controller:
Here is what happens when a Tab Bar Controller in embedded in the View Controller that I want it to be on:
What is the correct way to show a Tab Bar Controller on this View Controller that will preserve the existing navigationBar? Apple's Documentation on Tab Bar Controllers seems extensive and it seems it should be implemented programmatically.