简体   繁体   中英

How to change navigationBarTitle when there is a back button

I study SwiftUI.

Trying out of this:

在此处输入图像描述

Do it:

在此处输入图像描述

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()
                    })
    }
    
}

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM