0

我通过将主故事板更改为空来禁用故事板。而且我已经重写了所有内容,因此我不需要故事板并且它可以正常工作。但是在控制台日志中,应用程序窗口应该在应用程序启动结束时有一个根视图控制器。我可以忽略这条消息,他们会在提交后批准我的应用程序吗?didFinishLaunchingWithOptions:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];  
    self.tabBarController = [[AKTabBarController alloc] initWithTabBarHeight:65];
    SubscribeViewController *sub = [[SubscribeViewController alloc] initWithNibName:nil bundle:nil];
    UINavigationController *navControlelr = [[UINavigationController alloc] initWithRootViewController:sub];
    NewHomeViewController *home = [[NewHomeViewController alloc] initWithNibName:nil bundle:nil];
    UINavigationController *homeNav = [[UINavigationController alloc] initWithRootViewController:home];

    ReceivedPushViewController *receivedPush = [[ReceivedPushViewController alloc] initWithNibName:nil bundle:nil];

    MoreViewController *more = [[MoreViewController alloc] initWithNibName:nil bundle:nil];

    NSMutableArray *viewControllers = [NSMutableArray arrayWithArray:@[homeNav, navControlelr, receivedPush, more]];

    [self.tabBarController setViewControllers:viewControllers];
    [self.window setRootViewController:self.tabBarController];
    [self.window makeKeyAndVisible];

    return YES;
}
4

1 回答 1

2

我试过你的代码,问题是你重新实例化了应用程序窗口,你不需要这样做。如果您只是删除第一行代码,self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];您的应用程序应该可以正常工作,并且警告应该会消失。

于 2013-05-08T15:11:44.993 回答