我在控制台得到以下错误:
应用程序在启动结束时应该有一个根视图控制器
下面是我的application:didFinishLaunchWithOptions
方法:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Set Background Color/Pattern
self.window.backgroundColor = [UIColor blackColor];
self.tabBarController.tabBar.backgroundColor = [UIColor clearColor];
//self.window.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"testbg.png"]];
// Set StatusBar Color
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackTranslucent];
// Add the tab bar controller's current view as a subview of the window
self.window.rootViewController = self.tabBarController;
[self.window makeKeyAndVisible];
return YES;
}
在Interface Builder中,UITabBarController
的委托被连接到App委托。
有人知道怎么解决这个问题吗?