From cdd615136fe8f44c0abe6b8bc60de53439b27a37 Mon Sep 17 00:00:00 2001 From: zhongwuzw Date: Mon, 11 Feb 2019 14:08:42 -0800 Subject: [PATCH] Revert RCTRootView's backgroundColor to white (#23358) Summary: Fixes #23314 , the change came from #20945 , its purpose is to fix orientation change issue in HelloWord template, but I think it's just a trick, to make rootView's backgroundColor the same as window backgroundColor, the orientation issue seems related to [UIManager setAvailableSize:forRootView:](https://github.com/facebook/react-native/blob/d2fc19f4aa94888b7c3d3f4a5fb621bf96a1aff9/React/Modules/RCTUIManager.m#L343) async layout things. [iOS] [Fixed] - Revert RCTRootView's backgroundColor to white. Pull Request resolved: https://github.com/facebook/react-native/pull/23358 Differential Revision: D14030666 Pulled By: cpojer fbshipit-source-id: 7c9a45f03b87c3be0f2b7c64a3c837c6ae14af3e --- template/ios/HelloWorld/AppDelegate.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/ios/HelloWorld/AppDelegate.m b/template/ios/HelloWorld/AppDelegate.m index 7545c771168..101fb8c324c 100644 --- a/template/ios/HelloWorld/AppDelegate.m +++ b/template/ios/HelloWorld/AppDelegate.m @@ -20,7 +20,7 @@ moduleName:@"HelloWorld" initialProperties:nil]; - rootView.backgroundColor = [UIColor blackColor]; + rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; UIViewController *rootViewController = [UIViewController new];