react-native

ReactNative跳转到指定页面

2017-05-09  本文已影响0人  Erica0708

ReactNative像APP一样返回到指定页面

//得到Navigator的层级关系
var currentRoute = this.props.navigator.getCurrentRoutes();

for(var i = 0; i < currentRoute.length; i++){
  if(currentRoute[i].name  === '你想跳转的页面'){
      this.props.navigator.popToRoute(currentRoute[i]);
  }
}
上一篇 下一篇

猜你喜欢

热点阅读