A股上市公司传智教育(股票代码 003032)旗下技术交流社区北京昌平校区

 找回密码
 加入黑马

QQ登录

只需一步,快速开始

© 1374656143 中级黑马   /  2015-8-25 00:57  /  567 人查看  /  0 人回复  /   0 人收藏 转载请遵从CC协议 禁止商业使用本文

UITabBarController *tabbarController=[[UITabBarController
      alloc]init];
  AreaViewController *area=[[AreaViewController alloc]init];
  BulkViewController *bulk=[[BulkViewController alloc]init];
  SumViewController *sum=[[SumViewController alloc]init];
  tabbarController.viewControllers=@[area,bulk,sum];
UITabBar *tabBar = tabbarController.tabBar;
UITabBarItem *tabBarItem1 = [tabBar.items objectAtIndex:0]; UITabBarItem *tabBarItem2 = [tabBar.items objectAtIndex:1]; UITabBarItem *tabBarItem3 = [tabBar.items objectAtIndex:2]; [tabBarItem1 setTitle:@"面积"];
[tabBarItem1 setImage:[UIImage imageNamed:@"Area.png"]]; [tabBarItem2 setTitle:@"体积"];
[tabBarItem2 setImage:[UIImage imageNamed:@"Volume.png"]]; [tabBarItem3 setTitle:@"统计"];
[tabBarItem3 setImage:[UIImage imageNamed:@"Summary.png"]];
  self.window.rootViewController=tabbarController;

0 个回复

您需要登录后才可以回帖 登录 | 加入黑马