问题
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.
回答1:
I'd recommend creating another app using the "Tab Bar Application" template, and then look at the differences between that and your app.
回答2:
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.
来源:https://stackoverflow.com/questions/2326814/how-to-add-tabbarcontroller-in-viewcontroller-in-iphone