Answers for "set size of navigation title programmatically swift"

0

navigationbar large title swift

self.navigationController?.navigationBar.prefersLargeTitles = true
Posted by: Guest on May-23-2020
0

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)
        }
    }
}
Posted by: Guest on February-17-2021

Code answers related to "set size of navigation title programmatically swift"

Code answers related to "Swift"

Browse Popular Code Answers by Language