navigationBarTitle text size swiftui
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(Text("Dashboard").font(.subheadline), displayMode: .large)
//.navigationBarTitle (Text("Dashboard"), displayMode: .inline)
}
}
}
Also in Swift:
- shapes in swiftui
- where to save audio asset swift
- swift switch
- if statement swfit
- navigationview hide header swiftui
- swift empty an array
- remove all add TapGestureRecognizer swift
- get tabbar height swift
- swift ns_enum generic name
- swift save data to file
- swift set keyboard next functionality
- swift create uinavigationcontroller programmatically
- rotate image animated swift
- swift filter dictionary
- swift filter array
- swift play audio file
- UIFont.init bold
- async await swift
- how to set the font of text in swiftui
- hide bottom tab bar swift
- swift open web page
- swift share with
- create alert in swift
- custom binding swiftui