【发布时间】:2015-08-07 03:28:59
【问题描述】:
我在 react-native NavigatorIOS 中使用 onRightButton。 我希望能够调用驻留在我正在推送的组件中的函数,但我不知道如何实现。 这是代码示例:
this.props.navigator.push({
component: SingleResultView,
title: "SomeTitle",
rightButtonIcon: require('image!mapsmarker'),
passProps: {
userPosition: this.props.userPosition
},
onRightButtonPress: () => { SingleResultView.foo(); } // NOT WORKING!
});
我该怎么做?
【问题讨论】:
标签: javascript ios function react-native navigator