struct MyView: View {
init() {
UINavigationBar.appearance().largeTitleTextAttributes = [.foregroundColor: UIColor(Color.blue)] // Change blue with your desired color
UINavigationBar.appearance().titleTextAttributes = [.foregroundColor: UIColor(Color.blue)] // Change blue with your desired color
}
var body: some View {
// Whatever
}
}
1条答案
按热度按时间k7fdbhmy1#
在
View
的初始化器中,可以使用UIKit命令提供颜色。它是这样工作的: