23-团队分工 Storyboard

来源:互联网 发布:中国软件外包印度差距 编辑:程序博客网 时间:2024/05/17 08:56

1.AppDelegate.m

#import"RootTabBarController.h"

self.window= [[UIWindowalloc]initWithFrame:[UIScreenmainScreen].bounds];
self.window.backgroundColor= [UIColorwhiteColor];
[self.windowmakeKeyAndVisible];
   
self.window.rootViewController= [[RootTabBarControlleralloc]init];

2.RootTabBarController.m

#import "RootTabBarController.h"#import "OneViewController.h"#import "TwoViewController.h"#import "ThreeViewController.h"#import "FourViewController.h"@interface RootTabBarController ()@end@implementation RootTabBarController- (void)viewDidLoad {    [super viewDidLoad];    //1.获取Storyboard文件    UIStoryboard *one = [UIStoryboard storyboardWithName:@"one" bundle:nil];    //2.获取导航控制器   UINavigationController *oneN = [one instantiateViewControllerWithIdentifier:@"one"];       UIStoryboard *two = [UIStoryboard storyboardWithName:@"two" bundle:nil];    UINavigationController *twoN = [two instantiateViewControllerWithIdentifier:@"two"];       UIStoryboard *three = [UIStoryboard storyboardWithName:@"three" bundle:nil];    UINavigationController *threeN = [three instantiateViewControllerWithIdentifier:@"three"];       UIStoryboard *four = [UIStoryboard storyboardWithName:@"four" bundle:nil];     UINavigationController *fourN = [four instantiateViewControllerWithIdentifier:@"four"];          self.viewControllers = @[oneN, twoN, threeN, fourN];   }


0 0