【发布时间】:2022-01-20 04:24:59
【问题描述】:
您好,我想在 React Native 应用中添加启动画面。
我按照here 的说明进行操作,也检查了docs。
问题是 BootSplash.storyboard 没有出现在 xcode 中!
实际上,我应该从哪里在 app 文件夹中下药?
我想可能是因为应用程序中已经有一个LaunchScreen.storyboard。所以它不接受带有.storyboard 的两个文件。
所以我试着把代码从BootSplash.storyboard复制到LaunchScreen.storyboard。
它可以工作,但现在在启动屏幕之后应用程序崩溃了。
我确实在App.tsx 中使用了hide()。
useEffect(() => {
(async () => await RNBootSplash.hide({fade: true}))();
}, [])
我什至完全删除了BootSplash.storyboard。
可能是什么问题?
提前感谢您的帮助!
【问题讨论】:
标签: ios xcode react-native splash-screen