【发布时间】:2016-07-22 06:11:19
【问题描述】:
刚学了几天react-native。现在遇到一个关于NavigatorIOS组件的问题。我想知道是否有可能在 react-native 中获得 NavigatorIOS 的“子控制器”,就像在原生 Objective-c 中一样(使用 UINavigationController.viewControllers)。我想获取参考并调用一些更新方法。
_addNavigator: function (component, title) {
var data = null;
var temp = <NavigatorIOS
style={{ flex: 1 }}
barTintColor='#007AFF'
titleTextColor="#fff"
tintColor="#fff"
translucent={false}
initialRoute={{
component: component,
title: title,
passProps: {
data: data
}
}}/>;
componentArray.push(temp);
return temp;
}
【问题讨论】:
标签: javascript ios navigation react-native