我使用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
库的特定标签时,是否可以显示模态屏幕?