zoukankan      html  css  js  c++  java
  • 建立Empty Application,新建Storyboard并添加View Controller 控件后运行为空白,并报错

    建立Empty Application,新建Storyboard并添加View Controller 控件后运行为空白,并报错

    控制台显示:

    2012-07-18 15:21:57.338 apress-8[664:f803] Application windows are expected to have a root view controller at the end of application launch

    通过和Single View Application模版对比发现:需要至少修改两个地方:

    1、AppDelegate.m

     1 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
     2 {
     3 /*
     4     self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
     5     // Override point for customization after application launch.
     6     self.window.backgroundColor = [UIColor whiteColor];
     7     [self.window makeKeyAndVisible];
     8 */
     9     return YES;
    10 }

    2、项目配置,添加Main Storyboard


    /**************************************************************************
                      原文来自博客园——Submarinex的博客: www.cnblogs.com/submarinex/               
      *************************************************************************/

  • 相关阅读:
    20140710 sequence 前缀和
    20140709 testC 数学题
    20140708 testA 组合数学
    20140708 testB DP 组合数学
    Sad :(
    已经是一个废人了……
    Game Theory
    HDU Math Problems
    2-sat问题
    并查集
  • 原文地址:https://www.cnblogs.com/submarinex/p/2597501.html
Copyright © 2011-2022 走看看