2017-03-16 163 views

回答

0

它會默認自帶的標題下,你可以嘗試這樣的事情在你的index.android.js或index.ios.js

import React, {Component} from 'react'; 
import { AppRegistry, View, BackAndroid, StatusBar,} from 'react-native'; 
import { 
    NavigationActions, 
    addNavigationHelpers, 
    StackNavigator, 
    DrawerNavigator 
} from 'react-navigation'; 


import LandingScreen from 'src/screens/landingScreen'; 
import Login from 'src/screens/login' 
import SignUp from 'src/screens/signUp' 
import ForgotPassword from 'src/screens/forgotPassword' 
import Dashboard from 'src/screens/dashboard' 
import UserProfile from 'src/screens/userProfile' 

export const Drawer = DrawerNavigator({ 
    Dashboard:{ 
    path:'/', 
    screen:Dashboard, 
    }, 
    UserProfile:{ 
    path:'/' 
    screen:UserProfile 
    }, 
}, { 
    initialRouteName: 'Dashboard', 
    contentOptions: { 
    activeTintColor: '#e91e63', 
    }, 
    headerMode: 'screen', 
}); 

const routesConfig = { 
    Landing:{screen:LandingScreen}, 
    Login: { screen: Login }, 
    SignUp: { screen: SignUp }, 
    ForgotPassword: { screen: ForgotPassword }, 
    Drawer:{screen:Drawer} 
}; 

export const AppNavigator = StackNavigator(routesConfig, { 
    initialRouteName: 'Drawer' 
}); 
AppRegistry.registerComponent('Riduk',() => AppNavigator);