Ok, so I have 2 tab bar items that will be simple views with no navigation. So, I created 2 xib files for them. Im trying to load them, but my app terminates when I click on the tab button and says no view was loaded. Here is the code.....
H file -
Code:
IBOutlet MyInfoViewController *myMIViewController;
IBOutlet AboutUsViewController *myAUViewController;
@property (nonatomic, retain) MyInfoViewController *myMIViewController;
@property (nonatomic, retain) AboutUsViewController *myAUViewController;
M file -
Code:
// Tab #2 Setup
myMIViewController = [[MyInfoViewController alloc] initWithNibName:@"MyInfoView" bundle:nil];
myMIViewController.tabBarItem.image = [UIImage imageNamed:@"myinfotabbar25.png"];
// Tab #3 Setup
myAUViewController = [[AboutUsViewController alloc] initWithNibName:@"AboutUsView" bundle:nil];
myAUViewController.tabBarItem.image = [UIImage imageNamed:@"infotabbar25.png"];
// Add ViewControllers to tab-bar
tabBarController.viewControllers = [NSArray arrayWithObjects:
tableNavController, myMIViewController, myAUViewController, nil];
Any ideas how to load these 2 views from XIB files? If I just alloc/init them, the app works, but of course, the view isnt loaded.