【发布时间】:2019-10-23 11:45:38
【问题描述】:
请帮忙,我会先通过显示代码来解释:
home.js
onHelpPagePress() {
Promise.all([
AntDesign.getImageSource('arrowleft', 25)
]).then((sources) => {
Navigation.setRoot({
root: {
stack: {
children: [{
component: {
name: 'projectName.HelpPage',
options: {
topBar: {
title: {
text: 'Screen Name 1',
},
drawBehind: false,
leftButtons: [
{
id: 'backButton',
enabled: true,
showAsAction: 'ifRoom',
component: {
name: 'projectName.Home',
passProps: {
color: 'white',
// pass event here
}
},
icon: sources[0],
color: 'white',
},
],
}
}
},
}]
}
}
});
});
}
它看起来像这样:
------------------------------------
<- Screen Name 1
------------------------------------
如何访问新屏幕中的后退按钮?
有人可以帮助我如何转到上一个屏幕吗?
谢谢
【问题讨论】:
标签: react-native react-native-navigation