zoukankan      html  css  js  c++  java
  • iOS学习之移除Main.storyboard

    每次使用Single View Application模板创建工程之后,总是会有一个Main.storyboard文件,那么,当我们使用代码布局的时候,很显然是不需要它的。那么,如何将它从工程中移除呢?只要进行如下几步即可。

    在工程配置中移除关联

    在TARGETS中,将Main InInterface选项中的值清空并保存设置。

    移除Main.storyboard中的关联文件

    选择storyboard文件。将类关联文件项清空并保存设置。

    移除Main.storyboard文件

    从工程中移除文件。

    在AppDelegate中添加代码

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
        // Override point for customization after application launch.
        
        self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
        // Override point for customization after application launch.
        
        ViewController *viewController = [[ViewController alloc] init];
        self.window.rootViewController = viewController;
        
        self.window.backgroundColor = [UIColor purpleColor];
      [self.window makeKeyAndVisible];
        
       return YES;
    }

    完成以上几步,运行工程即可,顺利运行,没有出现任何error或waring。

  • 相关阅读:
    SQL盲注攻击的简单介绍
    xss编码小结
    XssEncode
    xss payload
    2014年八大信息安全峰会演讲
    xss bypass
    移动APP安全在渗透测试中的应用
    WAF实现扫描器识别
    thinkphp的系统变量
    thinkphp AOP(面向切面编程)钩子和行为
  • 原文地址:https://www.cnblogs.com/chars/p/5150155.html
Copyright © 2011-2022 走看看