我正在玩一个单窗口模板。我有一个经典MainStoryboard.storyboard
文件,我只有 1 个视图控制器(默认情况下都是初始视图控制器)
我所做的是尝试实现这个示例中的行为,Xcode 告诉我:
Application windows are expected to have a root view controller at the end of application launch
我不明白我做错了什么。这是我创建新的代码UIWindow
:
UIWindow *overlayWindow = [[UIWindow alloc] init];
overlayWindow = [[ACStatusBarOverlayWindow alloc] initWithFrame:CGRectZero];
overlayWindow.hidden = NO;
当然我的appDelegate
开始是这样的:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
return YES;
}
我究竟做错了什么?