Navigator 可以进行跳转 但是Navigator显示不出来 bu'zhi'dao'za'hui'shi



  • 0_1466996598344_1111.png

    部分代码如下:

    • index.ios.js
      import React, { Component } from 'react';
      import Index from './pages/Index';
      import {
      AppRegistry,
      StyleSheet,
      Text,
      View,
      Navigator,
      } from 'react-native';

    class xiechengdemo extends Component {

    renderScene(route, navigator) {

    let Component = route.component;
            if(route.component) {
              return <Component {...route.params} navigator={navigator} />
            }
    

    }

    render() {
    return (

    <Navigator 
            style={{flex:1}}
            initialRoute={{ name: 'myfirst', component: Index }}
            configureScene={(route) => {
              return Navigator.SceneConfigs.HorizontalSwipeJump;
            }}
            renderScene={this.renderScene}
            
          >
    
    </Navigator>
    
      
    );
    

    }

    }



  • 好像是需要去设置NavigatorButton的我看过别人做的一个Search House的Demo是设置了Navigator的布局的、如果是我倒不如直接自己写个view放到基类上面。。。省事