gpt4 book ai didi

react-native - 更改堆栈导航器的标题高度

转载 作者:行者123 更新时间:2023-12-05 06:15:57 28 4
gpt4 key购买 nike

我一直在尝试更改堆栈导航器标题的高度。但是,没有任何效果!

<Stack.Navigator initialRouteName="LiveLandingScreen">
<Stack.Screen name="LiveLandingScreen" component={LiveLandingScreen} />
<Stack.Screen name="History" component={History} />
</Stack.Navigator>

代码运行良好,但有人可以帮我更改标题高度吗?

谢谢

最佳答案

你需要做的是这样做,如果我们假设你想改变历史标题栏的高度,你会这样做:

<Stack.Navigator initialRouteName="LiveLandingScreen">
<Stack.Screen name="LiveLandingScreen" component={LiveLandingScreen} />
<Stack.Screen name="History" component={History} option={{headerStyle: {height: 60}}} />. ///ADD OPTION
</Stack.Navigator>

希望对你有帮助<3

关于react-native - 更改堆栈导航器的标题高度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62302356/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com