How to fix White Screen after Splash Screen in React Native for iOS

1.5k views Asked by At

For Android, I made the color of the white screen the same as the Splash Screen color. So how do I change the color of the white screen on iOS?

2

There are 2 answers

2
AlkanV On

use react-native-bootsplash or implement splash screen by your own.

you can change the bg color of splash screen using xCode, find and select the .storyboard that is currently used in your project. from the right side of your x code controls, you will see background prop, from there you can change it.

enter image description here

1
TheFuquan On

That white screen inbetween splash screen and the App screens is nonetheless a view of the rootviewcontroller, so basically you change that by changing its view's style.

In the AppDelegate.mm file

in the methode:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions

at the end you find

self.window.rootViewController = rootViewController;

that s the rootViewController you need to edit its background

rootViewController.view.backgroundColor = YOUR OWN COLOR ;
self.window.rootViewController = rootViewController;

You need to adapt the code to your context and the React Native version if the initialization process changed, but the main idea remains the same