环境:xcode4.0,Interface Builder
目的:我想不在MainWindow.xib里创建UITabBarController,改在其他的xib里
步骤:
1. 创建一个纯正Window Based项目2. 在xxxAppDelegate.h里增加一个viewcontroller属性(MainWindow.xib的东西我没修改)3. 添加一个customTab.xib4. 指定customTab.xib的File's Owner为 xxxAppDelegate5. 在customTab.xib里,从library拖出来一个Tab Bar Controller6. 在customTab.xib里,从library拖出来一个Object,custom class指向xxxAppDelegate7. 关联Tab Bar Controller到Object(即xxxAppDelegate)的viewcontroller启动项目,我发现UITabBar完全没显示出来。请问我哪个步骤出错了
目的:我想不在MainWindow.xib里创建UITabBarController,改在其他的xib里
步骤:
1. 创建一个纯正Window Based项目2. 在xxxAppDelegate.h里增加一个viewcontroller属性(MainWindow.xib的东西我没修改)3. 添加一个customTab.xib4. 指定customTab.xib的File's Owner为 xxxAppDelegate5. 在customTab.xib里,从library拖出来一个Tab Bar Controller6. 在customTab.xib里,从library拖出来一个Object,custom class指向xxxAppDelegate7. 关联Tab Bar Controller到Object(即xxxAppDelegate)的viewcontroller启动项目,我发现UITabBar完全没显示出来。请问我哪个步骤出错了
解决方案 »
- JAVA翻译成Objective-C
- 求助,有关oauth2.0授权成功后要保存的数据的问题
- coscos2d-x的一个问题!
- 终于盼来了!苹果iPhone SDK火热出炉
- tab页的title(字)如何修改大一点
- iOS····语法结构求分析
- iOS(编辑内容被键盘遮盖)ScrollView里的包含了TextField&&TextView(用了监听的方法)
- ios 申请后台延时,为什么只是运行3分钟就停止了,看网上说可以运行10分钟啊
- AppStore审核问题
- 以application/json格式向阿里云oss传输大文件过程中,有1%的概率文件中会出现乱码
- 系统默认弹出UIAlertView大小是多少?
- cocos2dx 怎么引用mach.h
方法也不只是唯一通过nib文件来实现,你可以用代码来写NSMutableArray *controllers=[NSMutableArray array];FirstViewController *firstVC=[[FirstViewController alloc] init];
[controllers addObject:firstVC];
[firstVC release];SecondViewController *secondVC=[[SecondViewController alloc] init];
[controllers addObject:secondVC];
[secondVC release];.......
//创建UITabBarController
UITabBarController *tabBarController=[[UITabBarController alloc] init];
[tabBarController setViewControllers:controllers];self.window.rootViewController=tabBarController;
[tabBarController release];
http://www.cocoachina.com/bbs/read.php?tid=125671 了。