我想看看哪些视图在屏幕上呈现在我的应用程序中。因此,我使用iOS模拟器的“屏幕外渲染”功能,它可以通过黄颜色给那些离屏渲染的视图着色。但是,在应用程序启动后,整个屏幕被黄色着色,我不相信它。iOS模拟器的“颜色偏屏渲染”功能有什么问题吗?
然后我尽我的测试代码,如:
- (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];
}
正如你可以在上面看到,我只是设置窗口的RootViewController的三次不同的原单控制器:“的UITabBarController”,“UINavigationController的”和“的UIViewController”。
猜猜是什么?
只有'UIViewController'不是全屏色!
所以任何人都知道为什么原单RootViewController的和的UINavigationController将出现整个屏幕屏幕外渲染??????