views:

34

answers:

1

Hey Guys,

Can you please explain me how to add a tab bar controller to the UIViewController..I think I have problem doing this..please help me..this is what I did so far..I added tab bar controller from IB and created a IBOutlet and made connections from file's owner to the Tab bar controller I added..when I run the app it displays a white screen..

- (void)viewDidLoad {
    [self.view addSubview:rootController.view];
    [super viewDidLoad];
}

rootController is of type UITabBarController

+1  A: 

If this is happening in your application delegate then you should have a "Window" and add the "rootController.view" to "window.view". Something like this:

[window addSubview:summonView.view];
Nippysaurus