www.2527.com_澳门新葡8455手机版_新京葡娱乐场网址_
做最好的网站

ios通过代码创建Tab

2019-06-29 13:27 来源:未知
self.tableViewController =[[TableViewController alloc] initWithNibName:@"TableViewController" bundle:nil];
self.viewController = [[ViewController alloc]initWithNibName:@"ViewController" bundle:nil];
 
self.tableViewController.title  =@"Table Usage";
self.viewController.title       =@"View Usage";
 
 
self.tabBarController= [[UITabBarController alloc] init];
 
NSMutableArray *controllers=[[NSMutableArray alloc] initWithCapacity:2];
[controllers addObject:self.tableViewController];
[controllers addObject:self.viewController];
 
 
self.tabBarController.viewControllers =controllers;
[self.window addSubview:self.tabBarController.view];
TAG标签:
版权声明:本文由澳门新葡8455手机版发布于计算机编程,转载请注明出处:ios通过代码创建Tab