LoginSignup
1
0

More than 5 years have passed since last update.

Expoでスタンドアロンビルドしたときにスプラッシュが裏で表示され続ける

Last updated at Posted at 2018-06-12

症状

とあるアプリを作ってスタンドアロンビルドしてみましたが、スプラッシュが消えなくてハマりました。

Screenshot_20180612-215309.png

こんな感じに...

解決

けっこう単純でした。
最下部の背景色を白にすることで解決できるようです。

AppLoadingでもいけるっぽいですが、ロードする物とか無かったのでとりあえずこれです。

import React, { Component } from 'react';
import { Text, View, StyleSheet } from 'react-native';
import { Constants } from 'expo';

export default class App extends Component {
  render() {
    return (
      <View style={styles.container}>
        <Text>スプラッシュがのこらない</Text>
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    paddingTop: Constants.statusBarHeight,
    backgroundColor: 'white',
  },
});

https://github.com/expo/expo/issues/1494
https://docs.expo.io/versions/latest/guides/splash-screens
https://docs.expo.io/versions/latest/sdk/app-loading.html

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0