Pugalmuni
Pugalmuni

Reputation: 9390

How to add tabbarcontroller in viewcontroller in iphone

I am new to iphone development, i have created my project in view based application and i want to add tabbar controller in my view. I have added tabbarcontroller using interface builder in my view and i cannot see the tabbar in my view.

Plz how can i add tabbarcontrolller in view.

So plz guide me.

thanks.

Upvotes: 1

Views: 1956

Answers (2)

Beardo
Beardo

Reputation: 1562

In your AppDelegate:

- (void)applicationDidFinishLaunching:(UIApplication *)application {    

    // Override point for customization after app launch    
    [window addSubview:[tabBarController view]];
    [window makeKeyAndVisible];
}

Where tabBarController is a outlet that's been plugged into the UITabBarController you made in InterfaceBuilder.

Upvotes: 1

Kristopher Johnson
Kristopher Johnson

Reputation: 82565

I'd recommend creating another app using the "Tab Bar Application" template, and then look at the differences between that and your app.

Upvotes: 1

Related Questions