<分区> 分区>
我的 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。