gpt4 book ai didi

javascript - 在 react-native 中更改导航标题栏标题的字体

转载 作者:行者123 更新时间:2023-11-29 13:51:58 24 4
gpt4 key购买 nike

在新版本中,即 react-native 的 0.61,我没有找到任何改变标题字体的机制。早期的版本有自己的解决方案,而现在的版本没有,这反过来又促使我提出这个问题。如何更改字体?

最佳答案

如果您在“reactnavigation”库中用于导航

那样做

As described in the documentation

class HomeScreen extends React.Component {
static navigationOptions = {
title: 'Home',
headerStyle: {
backgroundColor: '#f4511e',
},
headerTintColor: '#fff',
headerTitleStyle: {
fontWeight: 'bold',
},
};

/* render function, etc */
}

关于javascript - 在 react-native 中更改导航标题栏标题的字体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59228928/

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