1 | import { NativeModules } from 'react-native';
|
2 | const { ExponentSplashScreen: SplashScreen = {} } = NativeModules;
|
3 | export async function preventAutoHideAsync() {
|
4 | if (SplashScreen.preventAutoHide) {
|
5 | SplashScreen.preventAutoHide();
|
6 | return true;
|
7 | }
|
8 | return false;
|
9 | }
|
10 | export async function hideAsync() {
|
11 | if (SplashScreen.hide) {
|
12 | SplashScreen.hide();
|
13 | return true;
|
14 | }
|
15 | return false;
|
16 | }
|
17 |
|
18 |
|
19 |
|
20 | export function hide() {
|
21 | console.warn('SplashScreen.hide() is deprecated in favour of SplashScreen.hideAsync()');
|
22 | hideAsync();
|
23 | }
|
24 |
|
25 |
|
26 |
|
27 | export function preventAutoHide() {
|
28 | console.warn('SplashScreen.preventAutoHide() is deprecated in favour of SplashScreen.preventAutoHideAsync()');
|
29 | preventAutoHideAsync();
|
30 | }
|
31 |
|
\ | No newline at end of file |