如何设置标题模式?

时间:2018-12-28 00:59:31

标签: react-native react-navigation

我正在使用React Navigation的stacknavigator。我不想处理测试头的设置屏幕的头,但是我现在使用的代码不起作用。有什么问题吗?

const SettingStack = createStackNavigator({
  Setting: {
    screen: SettingScreen,
    headerMode: "none",
    navigationOptions: ({ navigation }) => ({
      headerTitleStyle: {
        fontSize: 25,
        color: "#373737",
        fontFamily: "NanumSquareRoundEB",
        marginTop: 63,
        alignSelf: "center"
      },

1 个答案:

答案 0 :(得分:0)

我认为您只需要将navigationOptions标头设置为null。您也可以始终在React navigation

上查看文档。
screen: SettingScreen,
 headerMode: "none", // I am not sure if you will need this
 navigationOptions: {
    header: null,
  },