私のアプリでオフスクリーンレンダリングされているビューを見たいと思っています。私はiOSシミュレータの「カラーオフスクリーンレンダリング」機能を使用して、オフスクリーンレンダリングビューを黄色で表示できます。しかし、画面は黄色で表示され、私はそれを信じていません。iOSシミュレータの「カラーオフスクリーンレンダリング」機能に問題がありますか?
その後、私の好きな私のテストコードを試してみてください。「UITabBarController」、「UINavigationController」と「のUIViewController」:あなたが上見ることができるように
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
self.window.backgroundColor = [UIColor whiteColor];
self.window.rootViewController = [[UITabBarController alloc] init];
// self.window.rootViewController = [[UINavigationController alloc] init];
// self.window.rootViewController = [[UIViewController alloc] init];
[self.window makeKeyWindow];
}
、私は単純にorginalコントローラによって異なるウィンドウのrootViewController 3回に設定します。
'UIViewController'のみが画面全体に色付けされていません!
orginal rootViewControllerとUINavigationControllerは、オフスクリーンレンダリング画面全体を発生しますだから、なぜ誰もが知っている??????