In SwiftUI, at this point we can not change the navigationBarTitle font directly, but you can change navigationBar appearance like this,struct YourView: View { init() { //Use this if NavigationBarTitle is with Large Font //UINavigationBar.appearance().largeTitleTextAttributes = [.font : UIFont(name: "Georgia-Bold", size: 20)!] //Use this if NavigationBarTitle is with displayMode = .inline UINavigationBar.appearance().titleTextAttributes = [.font : UIFont(name: "Georgia-Bold", size: 20)!] } var body: some View { NavigationView { Text("Hello World!") //.navigationBarTitle("TEST") .navigationBarTitle (Text("TEST"), displayMode: .inline) } }}我希望它能对您有所帮助.谢谢!I hope it will help you. Thanks!! 这篇关于如何在SwiftUI中更改.navigationBarTitle字体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 09-09 22:52