zoukankan      html  css  js  c++  java
  • 模拟ios应用加载页面

    1:设置应用程序系统主界面加载接口为空:Main interface=null;

    2: 在AppDelegate实现didFinishLaunchingWithOptions方法

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
        // Override point for customization after application launch.
        //    初始化窗口
        self.window=[[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds];
        //    设置窗口颜色
        self.window.backgroundColor=[UIColor redColor];
        //    自定义viewcontroller
        //    UIViewController *root=[[UIViewController alloc]init];
        //    root.view.backgroundColor=[UIColor blueColor];
        //    创建UIStoryboard对象
        UIStoryboard *storybord= [UIStoryboard storyboardWithName:@"Main" bundle:nil];
        //    1:创建指定storybordId的viewcontroller
        UIViewController *root=[storybord instantiateViewControllerWithIdentifier:@"green"];
        //     2:创建指定默认的viewcontroller
        //    UIViewController *root2=[storybord instantiateInitialViewController];
        //    设置rootViewController
        self.window.rootViewController=root;
        //显示窗口
        [self.window makeKeyAndVisible];
        return YES;
    }
    

      

  • 相关阅读:
    多浏览器CSS样式解决方法
    CSS基础
    HTML页面——常用模块
    CSS选择器
    li水平与div水平
    天梯题目解答——1012、1430
    天梯题目解答——1205、1075、1083、1160
    HTML5 元素拖动
    div简单水平移动效果
    Matlab代码优化--向量化
  • 原文地址:https://www.cnblogs.com/zhangliang1990/p/6608056.html
Copyright © 2011-2022 走看看