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
This commit is contained in:
parent
433c0e8021
commit
fa5d1fefa1
|
@ -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];
|
||||
|
|
Loading…
Reference in New Issue