IOS7空项目增加NavigationView后无法转向问题

原创
2013/06/26 19:02
阅读数 118

今天试着从空项目开始建立, 但发现一直无法定位我的主view上 .

log一直显示着: "Application windows are expected to have a root view controller at the end of application launch".

找了好多资料都无法定位, 后来发现只要把"didFinishLaunchingWithOptions"中的多余代码删除即正常 .......

如:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    // Override point for customization after application launch.
    self.window.backgroundColor = [UIColor whiteColor];

    [self.window makeKeyAndVisible];
    return YES;
}

改为

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    return YES;
}


展开阅读全文
打赏
0
2 收藏
分享
加载中
更多评论
打赏
0 评论
2 收藏
0
分享
返回顶部
顶部