zoukankan      html  css  js  c++  java
  • IOS 开发didFinishLaunchingWithOptions 设置启动View

    1.单View

    self.window= [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    self.window.backgroundColor=[UIColor grayColor];

    IOS01ButtonViewController *ios01MyButton=[[IOS01ButtonViewController alloc]init];

    self.window.rootViewController=ios01MyButton;

    [self.window makeKeyAndVisible];

    2.导航

    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    self.window.backgroundColor = [UIColor whiteColor];


    NavigationBarViewController *root=[[NavigationBarViewController alloc]init];

    NavigationViewController *nav = [[NavigationViewController alloc]initWithRootViewController:root];
    self.window.rootViewController=nav;

    /*UITabBarViewController
    *navigation=[[UITabBarViewController alloc]init];

    self.window.rootViewController =navigation;

    ButtonViewController *button1=[[ButtonViewController alloc]init];
    button1.tabBarItem.title=@"Messgae";
    button1.tabBarItem.badgeValue=@"99+";

    TooBarViewController *button2=[[TooBarViewController alloc]init];
    button2.tabBarItem.title=@"Messgae";
    button2.tabBarItem.badgeValue=@"99+";
    button2.view.backgroundColor=[UIColor blueColor];

    //[navigation addChildViewController:button1];
    //[navigation addChildViewController:button2];

    navigation.viewControllers=@[button1,button2 ];

    [self.window makeKeyAndVisible];

  • 相关阅读:
    [蓝桥杯][算法提高VIP]传染病控制
    PAT甲级第二次真题练习
    BFS()搜索加上hash
    PAT甲级第一次真题练习
    一个小练习题
    八皇后
    【Noi 1994 删数问题】【openjudge 3528 最小新整数(变式)】整型与字符
    【openjudge 2469 电池的寿命】算法与思维
    MarkDown测试
    HNOI 2017 怼大佬
  • 原文地址:https://www.cnblogs.com/zhangleixy/p/4933526.html
Copyright © 2011-2022 走看看