【发布时间】:2020-06-09 09:41:16
【问题描述】:
我在这里使用BottomTab进行这样的导航
import React from 'react';
import { NavigationContainer } from '@react-navigation/native';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import Home from './Home'
import Second from './Second'
import Other from './Other'
const Tab = createBottomTabNavigator();
function App() {
return (
<NavigationContainer>
<Tab.Navigator tabBarOptions={{
showLabel: true,
style: {
backgroundColor: 'transparent',
position: 'absolute',
borderTopWidth: 0,
elevation: 0,
}
}}>
<Tab.Screen name="Home" component={Home}/>
<Tab.Screen name="Second" component={Second}/>
<Tab.Screen name="Other" component={Other} />
</Tab.Navigator>
</NavigationContainer>
);
}
export default App;
我想:
在
Home和Other屏幕上BottomTab正常可见-
在
Second屏幕上,BottomBar 消失(此处您只能单击返回返回另一个屏幕,BottomTab 可见)
如何获得这种效果? (相机在这个屏幕上打开,所以我不想让 BottomBar 可见))
编辑:
应该和图片一样
在这种情况下(中键)我们只能撤消
【问题讨论】: