如何在React Native中向NavigatorIOS添加右键?
问题描述:
试图让NavigatorIOS在React Native中工作,但我无法让按钮显示在右侧。我打电话给这个代码此块当用户成功登录使用Facebook的API:如何在React Native中向NavigatorIOS添加右键?
this.props.navigator.replace({
title:"Agni",
component: SwipeScreen,
rightButtonTitle: 'Matches',
onRightButtonPress:() => { console.log("matches") },
passProps:{'token': {result: info}},
});
是否调用的.push有什么关系,为什么它不会出现.replace这一翻译?
谢谢。
答
当使用this.props.navigator.push()
而不是this.props.navigator.replace()
时,我能够看到我的rightButtonTitle
。
在React Native的Github问题页面上,this issue正是您所遇到的。最后一条评论,从25天前,也表示replace
患有这个相同的问题。