更新时间:2023-12-05 11:44:58
实际上,您可以在导航上使用setOptions
设置自定义选项.尽管建议您重新组织导航结构.如果创建不与TabBar
嵌套的StackNavigator
,这可能是可能的.
Indeed you can use setOptions
on the navigation to set custom options. Although it's recommended to rather reorganize the navigation structure. This might be possible if you create a StackNavigator
not nested with the TabBar
.
React.useLayoutEffect(() => {
navigation.setOptions({ tabBarVisible: false });
}, [navigation]);