应用程序在启动时应该有一个根视图控制器。
应用程序在启动时应该有一个根视图控制器。
我在控制台收到以下错误:
应用程序在启动结束时应该有一个根视图控制器
以下是我的 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
的委托已连接到应用程序委托。
有人知道如何解决这个问题吗?
admin 更改状态以发布 2023年5月24日