如何解决如何在React Native中为启动画面的传出过渡设置动画
我已经使用react-native-splash-screen插件创建了一个android初始屏幕。但是,在主应用程序屏幕加载之前,我必须对初始屏幕进行缩小过渡。有谁知道该怎么做?
解决方法
您可以使用库的变体来做到这一点:
import AnimatedSplash from "react-native-animated-splash-screen";
render() {
return (
<AnimatedSplash
translucent={true}
isLoaded={this.state.isLoaded}
logoImage={require("./assets/logo.png")}
backgroundColor={"#262626"}
logoHeight={150}
logoWidth={150}
>
<App />
</AnimatedSplash>
);
}
只要看看docs。