【发布时间】:2021-12-19 05:03:38
【问题描述】:
我已尝试使用 react-native-svg 为我的项目中的 SplashScreen 页面加载我的 svg 图像。但 Logo Image 在文字之后出现的速度较慢。文字本身和标志是同一个svg文件
这是我的代码
import React, {Component} from 'react';
import {StyleSheet, View} from 'react-native';
import {Logo} from '../../assets';
export default class Splash extends Component {
componentDidMount() {
setTimeout(() => {
this.props.navigation.replace('MainApp');
}, 3000);
}
render() {
return (
<View style={styles.pages}>
<Logo />
</View>
);
}
}
const styles = StyleSheet.create({
pages: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
backgroundColor: 'white',
},
});
这是我的Svg File
【问题讨论】:
标签: reactjs react-native image svg splash-screen