【发布时间】:2014-10-05 20:06:24
【问题描述】:
我正在尝试在 App 委托中以编程方式创建窗口,但状态栏隐藏了。在 info.plist 中它没有设置为 YES。该应用程序以这种方式完美运行,但我也需要显示状态栏。 我在 AppDelegate.h 中有 window 和 navigationController 属性 这是我的didFinishLaunch
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
//even when I used customized CGRect and used it initWithFrame, there is no status bar
self.navigationController = [[IEENavigationController alloc] init];
XYZViewController *homeViewController = [[XYZViewController alloc] initWithNibName:@"XYZViewController" bundle:nil];
[navigationController pushViewController:homeViewController animated:YES];
self.window.rootViewController = self.navigationController;
[window addSubview:navigationController.view];
[self.window makeKeyAndVisible];
return YES;
提前谢谢你
【问题讨论】:
标签: ios objective-c window statusbar appdelegate