iOS下Navigator为什么用不了



  • 如题,或者谁发我一个demo也可以,我按照文档写了显示不出来
    莫非iOS下只能用NavigatorIOS,我觉得不大可能,求指教

    代码如下

    index.ios.js

    'use strict';

    var {
    View,
    Navigator
    } = React;
    var FirstPageComponent = require('./FirstPageComponent');

    var SampleComponent = React.createClass({
    render: function() {
    var defaultName = 'FirstPageComponent';
    var defaultComponent = FirstPageComponent;
    return ( < Navigator initialRoute = {
    {
    name: defaultName,
    component: defaultComponent
    }
    }
    configureScene = {
    () => {
    return Navigator.SceneConfigs.VerticalDownSwipeJump;
    }
    }
    renderScene = {
    (route, navigator) => {
    let Component = route.component;
    if (route.component) {
    return <Component {...route.params
    }
    navigator = {
    navigator
    }
    />
    }
    }
    }
    />
    );

    }
    });


  • administrators

    贴代码和具体报错信息 另外blog区的navigator教程看过没?


登录后回复