【发布时间】:2014-03-24 23:23:21
【问题描述】:
当我设置并运行我的应用程序时,状态栏不会出现。我有一个名为:“MOVViewController”的视图控制器,带有 .xib 文件。在 AppDelegate.h 我有这个:
@property (nonatomic, retain) IBOutlet MOVViewController *viewController_;
在 .m 中,我有这个:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
self.window.backgroundColor = [UIColor whiteColor];
CGRect rcScreen = [[UIScreen mainScreen] applicationFrame];
_window = [[UIWindow alloc] initWithFrame:rcScreen];
viewController_ = [[MOVViewController alloc] init];
[_window addSubview:viewController_.view];
[self.window makeKeyAndVisible];
return YES;
}
当我运行它时,会出现视图控制器,但没有状态栏。为什么? 提前致谢
【问题讨论】:
标签: ios objective-c statusbar uiwindow