From fa5d1fefa1dd1bfd41547ae9390dffa7787a5dfb Mon Sep 17 00:00:00 2001 From: Shane O'Sullivan Date: Sat, 14 May 2016 22:28:39 -0700 Subject: [PATCH] Make the root view background color explicit Summary: The default white background for the root view causes an unattractive flash when loading any app with a non-white background. Almost every developer has to search for how to fix it. This change makes the background color explicit in the file, so it can be easily change to match the color of the splash screen and the main screen without having to search for it. **Test plan (required)** Launched my app and it still has a white flash for the background before loading the app. I changed the background colors to other values and the flash was that color. Closes https://github.com/facebook/react-native/pull/7570 Differential Revision: D3303451 Pulled By: vjeux fbshipit-source-id: 61dbab768095c430bcb583bafb57575a7d767e6f --- local-cli/generator-ios/templates/app/AppDelegate.m | 1 + 1 file changed, 1 insertion(+) diff --git a/local-cli/generator-ios/templates/app/AppDelegate.m b/local-cli/generator-ios/templates/app/AppDelegate.m index 909092b9c..3b4879f86 100644 --- a/local-cli/generator-ios/templates/app/AppDelegate.m +++ b/local-cli/generator-ios/templates/app/AppDelegate.m @@ -47,6 +47,7 @@ moduleName:@"<%= name %>" initialProperties:nil launchOptions:launchOptions]; + 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];