如何隐藏 react-navigation 标题下的阴影? [英] How do I hide the shadow under react-navigation headers?
本文介绍了如何隐藏 react-navigation 标题下的阴影?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何隐藏 react-navigation 标题下的阴影?
它们看起来像这样.
How do I hide the shadow under react-navigation headers?
They look like this.
推荐答案
将以下内容添加到 navigationOptions 标题样式中.
Add the following to the navigationOptions header style.
const AppNavigation = StackNavigator(
{
'The First Screen!': { screen: FirstScreen },
},
{
navigationOptions: {
header: {
style: {
elevation: 0, // remove shadow on Android
shadowOpacity: 0, // remove shadow on iOS
},
},
},
},
);
文档还不是很好,但您可以在 React Navigation Docs<中了解导航选项/a>.
The documentation isn't great yet, but you can learn about navigationOptions in the React Navigation Docs.
这篇关于如何隐藏 react-navigation 标题下的阴影?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文