本文介绍了如何在iPhone的ViewController中添加TabbarController的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是iPhone开发的新手,我已经在基于视图的应用程序中创建了我的项目,我想在视图中添加标签栏控制器.我在视图中使用界面生成器添加了tabbarcontroller,但在视图中看不到选项卡.
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.
我如何在视图中添加tabbarcontrolller.
Plz how can i add tabbarcontrolller in view.
所以请引导我.
谢谢.
推荐答案
在您的AppDelegate中:
In your AppDelegate:
- (void)applicationDidFinishLaunching:(UIApplication *)application {
// Override point for customization after app launch
[window addSubview:[tabBarController view]];
[window makeKeyAndVisible];
}
其中的tabBarController是已插入您在其中制作的UITabBarController的插座InterfaceBuilder.
Where tabBarController is a outlet that's been plugged into the UITabBarController you made inInterfaceBuilder.
这篇关于如何在iPhone的ViewController中添加TabbarController的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!