【发布时间】:2023-02-16 22:22:01
【问题描述】:
React Native 中的 Splash Screen 后出现白屏。这是什么原因呢?我想在不使用包的情况下解决这个问题。我能做些什么?
【问题讨论】:
标签: react-native splash-screen android-splashscreen react-native-splash-screen
React Native 中的 Splash Screen 后出现白屏。这是什么原因呢?我想在不使用包的情况下解决这个问题。我能做些什么?
【问题讨论】:
标签: react-native splash-screen android-splashscreen react-native-splash-screen
来自 React 本机文档 - https://reactnative.dev/docs/publishing-to-app-store:
专业提示
随着 App Bundle 大小的增长,您可能会开始看到启动画面和根应用程序视图显示之间出现空白屏幕。如果是这种情况,您可以将以下代码添加到 AppDelegate.m 以在转换期间保持启动画面显示。
// Place this code after "[self.window makeKeyAndVisible]" and before "return YES;" UIStoryboard *sb = [UIStoryboard storyboardWithName:@"LaunchScreen" bundle:nil]; UIViewController *vc = [sb instantiateInitialViewController]; rootView.loadingView = vc.view;
【讨论】: