1. Edit the _data/metadata.json with your site's information.
  2. (Optional) Edit .eleventy.js with your configuration preferences.
  3. Delete this message from _includes/layouts/base.njk.

This is an Eleventy project created from the eleventy-starter repo.

React Native - Set RootView Background Color

In the RootView of a React Native app, the default background color is white. We can change this to another color by following the steps below.

Note: Changing the background color may resolve issues related to launch screen flicker/flash and background color during orientation change.

iOS #

  1. Open AppDelegate.m located in PROJECT_DIR/ios/AppName/
  2. Locate line that matches or is similar to:
    rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
  3. Adjust UIColor values!
  • UIColor is a handy website that can be used to convert HEX & RGB colors to UIColor for both Objective-C and Swift.

Share on Twitter