react-native-splash-screen 在ios启动屏中的使用

环境

1
2
3
4
XCode Version 10.2 (10E125)
"react": "16.8.6",
"react-native": "0.60.5",
"react-native-splash-screen": "^3.2.0",

安装

1
2
3
4
yarn add react-native-splash-screen
cd ios
pod install
cd ..

使用

1
2
3
4
import SplashScreen from 'react-native-splash-screen'
componentDidMount() {
SplashScreen.hide()
}

配置

添加启动图片

启动屏1-2019103015566
启动屏1-2019103015566

启用自定义启动图

启动屏2-20191030155626
启动屏2-20191030155626
启动屏0-20191030155636
启动屏0-20191030155636

参考1 && 参考2