iOS 5.1.1 で、UIWindow を作成し (IB にうんざりしています)、そのフレームを [UIScreen mainScreen].bounds に設定すると、ウィンドウがステータス バーの下に表示されることがわかりました。ただし、iOS 6 で同じことを行うと、ステータス バーのすぐ下の適切な場所に表示されます。
CGRect r = [[UIScreen mainScreen] bounds];
self.window = [[UIWindow alloc] initWithFrame: r];
self.detailViewController = [[DetailViewController alloc] init];
self.window.rootViewController = self.detailViewController;
[self.window addSubview: detailViewController.view];
[self.window makeKeyAndVisible];
ただし、r.origin.y += 20 を挿入して、ウィンドウを iOS 5.1.1 のステータス バーの下に移動すると、問題は解決せず、状況が悪化するだけです。
プログラムで作成するときにiOSにUIWindowを配置する適切な方法は何ですか? ありがとう。