[Objective-C] ios通过代码创建Tab Bar →→→→→进入此内容的聊天室

来自 , 2019-02-22, 写在 Objective-C, 查看 133 次.
URL http://www.code666.cn/view/e0308d73
  1. self.tableViewController =[[TableViewController alloc] initWithNibName:@"TableViewController" bundle:nil];
  2. self.viewController = [[ViewController alloc]initWithNibName:@"ViewController" bundle:nil];
  3.  
  4. self.tableViewController.title  =@"Table Usage";
  5. self.viewController.title       =@"View Usage";
  6.  
  7.  
  8. self.tabBarController= [[UITabBarController alloc] init];
  9.  
  10. NSMutableArray *controllers=[[NSMutableArray alloc] initWithCapacity:2];
  11. [controllers addObject:self.tableViewController];
  12. [controllers addObject:self.viewController];
  13.  
  14.  
  15. self.tabBarController.viewControllers =controllers;
  16. [self.window addSubview:self.tabBarController.view];
  17. //objectc/5846

回复 "ios通过代码创建Tab Bar"

这儿你可以回复上面这条便签

captcha