[英]Handle Back Button in each scene navigation in react Native
I have included the back button as a image in the scene which i want back button, I want to perform the back action in the component, Is it possible? 我已经将后退按钮作为图像包含在场景中,我想要后退按钮,我想在组件中执行后退操作,这可能吗?
<Scene key=“Courses” icon={TabIcon} iconName=“book” backButtonImage={require(‘./app/icons/back.png’)}>
<Scene key=“CourseList” component={CourseList} title=“Courses” navigationBarStyle={styles.navBarColor} titleStyle={styles.navBarTitleColor} />
<Scene key=“levels” component={levels} barButtonIconStyle={{ tintColor: ‘white’ }} navigationBarStyle={styles.navBarColor} titleStyle={styles.navBarTitleColor} leftButtonIconStyle = {{ tintColor:‘red’}} title=“”/>
<Scene key=“Units” component={Units} barButtonIconStyle={{ tintColor: ‘white’ }} navigationBarStyle={styles.navBarColor} titleStyle={styles.navBarTitleColor} /></Scene>
What module are you using to handle navigation? 您正在使用哪个模块来处理导航?
Have you tried https://reactnavigation.org/ 您是否尝试过https://reactnavigation.org/
With this module, it's quite straightforward to handling this. 有了这个模块,就可以很简单地处理它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.