ps. Thanks to everyone who helped me today. I am ready to submit my app after this one little bug is removed. Ive been using addSubView instead of pushViewController and I just need to make this one last change.
The view that is calling this is one of the tab bar controller's views. Is this the reason for the problem?
From UINavigationController Class Referene:
- (id)initWithRootViewControllerUIViewController *)rootViewController Parameters rootViewController
The view controller that resides at the bottom of the navigation stack. This object cannot be an instance of the UITabBarController class.
In IB I have my Tab bar controller. I changed the first tab's controller class from my own view controller class to UINavigationController.
Then, in the App delegate I added this code. The view never gets shown, only a white view with a top bar (blue)
Code:
firstTabVC = [tabBarController.viewControllers objectAtIndex:0];
MyFirstViewController *FirstVC = [[MyFirstViewController alloc] init];
[firstTabVC.navigationController pushViewController:FirstVC animated:FALSE];
// Add the tab bar controller's current view as a subview of the window
[window addSubview:tabBarController.view];
[window makeKeyAndVisible];
For the IB route, just drag a navigation controller directly into your tab bar. Then find the view controller inside of that and set that to be your custom view controller class.