當我設置我的應用程序並運行它時,狀態欄不出現。我有一個名爲:「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;
}
當我運行它時,會出現視圖 - 控制,但沒有狀態欄。爲什麼?在didFinishLaunchingWithOptions方法 預先感謝
我將此添加到didFinishLaunchingWithOptions方法,但仍然有一個黑色條狀態欄應該是 – user2430463
所以之前,您沒有看到任何狀態欄。現在,它是黑色的,沒有文字? –
不,它總是像這樣 – user2430463