我只是想知道,在React Native中,是否可以创建一个垂直覆盖;我的意思是,在页面上,当向下滑动时,一个覆盖下来,覆盖着页面,上面有各种信息(向上滑动时也是如此,覆盖来自底部)。一开始我想使用react-native-swiper,但垂直滑动与Android不兼容。所以,如果有人有其他的解决方案,请便!谢谢
发布于 2017-06-21 19:58:21
请查看react-native-parallax-view,希望这能帮助你。
编辑
示例:
return (
<View style={[{ flex: 1 }]}> {/* add parent container and then ParallaxView as specified in documentation */}
<ParallaxView
backgroundSource={require('image!backgroundImage')}
windowHeight={300}
header={(
<Text style={styles.header}>
Header Content
</Text>
)}
scrollableViewStyle={{ backgroundColor: 'red' }}
>
<View>
// ... scrollview content
</View>
</ParallaxView>
</View>
);https://stackoverflow.com/questions/44674482
复制相似问题