ekkeee
ekkeee

Reputation: 147

How to change navigationBarTitle when there is a back button

I study SwiftUI.

Trying out of this:

enter image description here

Do it:

enter image description here

How to add the title correctly in this case?

code:

struct CalculatorView: View {
 
    var body: some View {

        .navigationBarTitle("Оформить займ")
        .navigationBarBackButtonHidden(true)
        .navigationBarItems(leading: CustomBackButton {
            presentationMode.wrappedValue.dismiss()
                    })
    }
    
}

Upvotes: 0

Views: 54

Answers (1)

magnuskahr
magnuskahr

Reputation: 1320

When you set your title, you can also specify a displayMode:

.navigationBarTitle("Title", displayMode: .inline)

Upvotes: 2

Related Questions