xcode 4.2中怎样添加Tab Bar子项目呢?
谢谢各位先
谢谢各位先
解决方案 »
- address doesn't contain a section that points to a section in a object file
- 【ios】十六进制 转换为 ASC 算法
- Add subView 后subView不显示也不出错,求解
- 为什么学习iOS开发要先学C语言呢?
- 怎样在UIView上面画一个rgb的数据?
- 国内IOS,一般都开发些什么?
- 方法间传值问题
- 想改变一个APP的屏幕方向,有没有办法?
- IOS蓝牙4.0开发数据接收问题
- 如何在wkwebview下,xcode控制台输出console.log
- 新手入门,关于xcode4.3下非storyboard的single view问题
- 没有苹果电脑能搞iOS开发吗?
{
if (self=[super initWithNibName:nil bundle:nil]) {
//tabBar1
FirstTabBar *tab1 = [[[FirstTabBar alloc] init] autorelease];
tab1.tabBarItem = [[[UITabBarItem alloc] initWithTitle:@"FirstTabBar"
image:nil
tag:0] autorelease];
tab1.tabBarItem.image=[UIImage imageNamed:@"icon_map.png"];
UINavigationController *tab1Nav = [[[UINavigationController alloc] init] autorelease];
[tab1Nav pushViewController:tab1 animated:NO]; // TabBar2
SecondTabBar *tab2 = [[[SecondTabBar alloc] init] autorelease];
tab2.tabBarItem = [[[UITabBarItem alloc] initWithTitle:@"SecondTabBar"
image:nil
tag:0] autorelease];
tab2.tabBarItem.image=[UIImage imageNamed:@"icon_search.png"];
//TabBar3
ThreeTabBar *tab3 = [[[ThreeTabBar alloc] init] autorelease];
tab3.tabBarItem = [[[UITabBarItem alloc] initWithTitle:@"ThreeTabBar"
image:nil
tag:0] autorelease];
tab3.tabBarItem.image=[UIImage imageNamed:@"icon_list.png"];
//TabBar4
FourTabBar *tab4 = [[[FourTabBar alloc] init] autorelease];
tab4.tabBarItem = [[[UITabBarItem alloc] initWithTitle:@"FourTabBar"
image:nil
tag:0] autorelease];
tab4.tabBarItem.image=[UIImage imageNamed:@"icon_twitter.png"];
// 组装TabBar
self.viewControllers = [NSArray arrayWithObjects:tab1Nav, tab2,tab3,tab4, nil];
}
return self;
}