我想更改我的导航栏背景颜色,但返回给我:类型错误:对象不是一个函数(评估'renderHeader'(;
如何修复此错误?
static navigationOptions = ({navigation}) => ({
title: 'Login',
header: {
title: "Title",
style: {
backgroundColor: 'red'
},
tintColor: 'red'
}
});
试试这个...
static navigationOptions = () => ({
title: 'Contact Us',
headerTintColor: Colors.Green,
headerStyle: {
backgroundColor: 'red'
}
});
隐藏特定页面的navigationbar
static navigationOptions = {
header:null
}
我想,navigationOptions
应该是Object。试试这个:
static navigationOptions = {
title: 'Login',
header: {
title: "Title",
style: {
backgroundColor: 'red'
},
tintColor: 'red'
}
};