I've been trying to learn iPhone development by making a sample app, and now I'm stuck trying to get a UITabBarController to be shown. I have an custom view Controller with the NIB -file containing the Tab Bar Controller:
In my controller's .h I've defined an IBOutlet for the UITabBarController:
IBOutlet UITabBarController *tabController;
And I've defined the @property for the same variable:
@property (nonatomic, retain) IBOutlet UITabBarController *tabController;
Then in the AppDelegate I try to use the UITabBarController to show the tab bar:
NetworkViewController *controllerInst = [[NetworkViewController alloc] initWithNibName:@"NetworkViewController" bundle:[NSBundle mainBundle]];
[self setNetworkController:controllerInst];
[controllerInst release];
[window addSubview:[[networkController tabController] view]];
[window makeKeyAndVisible];
The Tab Bar Controller has been linked to the Outlet (as the image above shows).
I really am new to Objective-C and iPhone development, so it's ok if your answer is "You're going about this all wrong..." ;)