App flashing white after launch screen on iOS 11?

前端 未结 2 878
-上瘾入骨i
-上瘾入骨i 2021-01-06 23:22

Since I updated my phone to iOS 11 I have noticed that my React Native app briefly (<0.5s) flashes to white between the launch screen and the first screen of the app. Thi

2条回答
  •  忘掉有多难
    2021-01-06 23:53

    you may start to see a white screen flash between your splash screen and the display of your root application view. try this

    set your launch screen as RCTRootView loading view

    AppDelegate.m

    // Place this code after "[self.window makeKeyAndVisible]" and before "return YES;"
    UIView* launchScreenView = [[[NSBundle mainBundle] loadNibNamed:@"LaunchScreen" owner:self options:nil] objectAtIndex:0];
    launchScreenView.frame = self.window.bounds;
    rootView.loadingView = launchScreenView;
    

    More info

    https://facebook.github.io/react-native/docs/running-on-device#pro-tip

提交回复
热议问题