jjzjj

ios - 设置 Root View 时的 "Application windows are expected to have a root view controller at the end of application launch"消息

coder 2023-09-28 原文

<分区>

我的 App Delegate 文件中有以下代码:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    MBFeedViewController *feedViewController = [[MBFeedViewController alloc] init];
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    [self.window setRootViewController:feedViewController];
    [self.window makeKeyAndVisible];
    return YES;
}

然后当我运行我的应用程序时,控制台输出消息:

Application windows are expected to have a root view controller at the end of application launch

这个我想不通。当我设置窗口的 RootViewController 时,FeedViewController 不是 nil

有关ios - 设置 Root View 时的 "Application windows are expected to have a root view controller at the end of application launch"消息的更多相关文章

随机推荐