簡體   English   中英

在React Native中的每個場景導航中處理后退按鈕

[英]Handle Back Button in each scene navigation in react Native

我已經將后退按鈕作為圖像包含在場景中,我想要后退按鈕,我想在組件中執行后退操作,這可能嗎?

<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>

您正在使用哪個模塊來處理導航?

您是否嘗試過https://reactnavigation.org/

有了這個模塊,就可以很簡單地處理它。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM