ご存知のとおり、Apple は iOS7 でステータス バーの動作方法を変更したため、cordova/phonegap アプリであらゆる種類の問題が発生しています。
次のコードを使用して、デバイスが iOS7 を実行している場合、ビューを 20px 押し下げることができました。
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) {
[application setStatusBarStyle:UIStatusBarStyleLightContent];
// handling statusBar (iOS6) by leaving top 20px for statusbar.
screenBounds.origin.y = 20;
self.window = [[UIWindow alloc] initWithFrame:screenBounds];
}
else {
self.window = [[UIWindow alloc] initWithFrame:screenBounds];
}
問題は、このコードによって作成された 20 ピクセルのギャップの背景が次のように黒いことです。
コードが作成したこのスペースの背景色を変更するにはどうすればよいですか?
私の MainViewController.xib では、背景色が白に設定されています。この黒い背景色の属性はどこから来ているのですか?
MainViewController.xib の属性は次のとおりです。
どうもありがとう