React Navigation TabNavigator show Modal?

时间:2017-10-13 07:57:03

标签: react-native react-navigation

我使用react-navigation库创建了一个应用程序。

App.js代码如下:

import React from 'react';
import { TabNavigator } from 'react-navigation';

import ProfilePage from './ProfilePage';
import NewsFeedPage from './NewsFeedPage';
import SearchPage from './SearchPage';
import NewPostPage from './NewPostPage';
import FavouritePage from './FavouritePage';

// Tab Bar
const TabBarContainer = TabNavigator({
    NewsFeed: {
        screen: NewsFeedPage,
    },
    Search: {
        screen: SearchPage,
    },
    NewPost: {
        screen: NewPostPage,
    },
    Favourite: {
        screen: FavouritePage,
    },
    Profile: {
        screen: ProfilePage,
    },
}, {
    tabBarOptions: {
        activeTintColor: '#E87E90',
        tabBarPosition: 'bottom', 
        showLabel: false,
        showIcon: true,
    }
});

export default TabBarContainer;

我想以模态方式显示NewPost标签。当我切换到TabNavigator react-navigation库的特定标签时,是否可以显示模态屏幕?

0 个答案:

没有答案