应用程序在应用程序启动结束时将有一个根视图控制器。我的控制台中有以下错误:应用程序在应用程序启动结束时将有一个根视图控制器。下面是我的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;}在接口生成器中,UITabBarController其委托连接到AppDelegate。有人知道怎么解决这个问题吗?
3 回答
慕姐4208626
TA贡献1852条经验 获得超7个赞
[window addSubview:[someController view]];
[self.window setRootViewController:someController];
炎炎设计
TA贡献1808条经验 获得超4个赞
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
- (void)viewDidLoad
- (void)viewDidAppear:(BOOL)animated
UIAlertView
- 3 回答
- 0 关注
- 623 浏览
添加回答
举报
0/150
提交
取消