キーウィンドウの上にビューを追加して、すべてのページに表示できるようにします。ただし、方向を変更すると、ビューはそれに応じて回転しません。これは、アップルが回転方法を変更したios6以降に発生していると思います。私の質問は、ローテーションの問題を解決する方法、またはすべてのページの上にビューを表示する別の簡単な方法があるかどうかです。ありがとう。
ニック C の更新:
2 つの UIWindow オブジェクトを作成して、ソリューションに従いました。ただし、デバイスを回転させると、黒い背景と半透明のトップ ウィンドウが表示されます。回転アニメーションが完了すると、元のウィンドウが表示されます。ユーザーエクスペリエンスが悪いと思います。これを解決する方法について何か考えはありますか?これが私のコードです:
self.topWindow = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.watermarkViewController = [[WatermarkViewController alloc] init];
self.topWindow.rootViewController = self.watermarkViewController;
self.topWindow.windowLevel = UIWindowLevelAlert;
[self.topWindow makeKeyAndVisible];
self.topWindow.userInteractionEnabled = NO;
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
self.viewController = [[ContentViewController alloc] initWithNibName:@"ContentViewController" bundle:nil];
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];