import { Platform } from "react-native";
const TITLE_OFFSET = Platform.OS === 'ios' ? 70 : 56;
......
...隐藏标题栏
Home: {
screen: Example ,
navigationOptions: {
header: null
}
},
...标题栏的居中显示
Test: {
screen: Example,
navigationOptions: {
title: 'test',
headerTitleStyle:{
textAlign: 'center',
flex:1,
},
headerTitleContainerStyle:{
left: TITLE_OFFSET,
right: TITLE_OFFSET,
}
}
}
隐藏标题栏
标题栏居中
网友评论