[iOS]ナビゲーションBarItemsの変更


struct ChangeName: View {
    @Binding var defaultName: String
    @State var changeprofileName: String = ""
    var body: some View {
        TextField(self.defaultName, text: $changeprofileName).modifier(ClearButton(changeprofileName: $changeprofileName))
        .navigationBarTitle("이름", displayMode: .inline)
        .navigationBarBackButtonHidden(true)
        .navigationBarItems(leading:
            HStack {
            //TODO: 닉네임을 취소로 바꾸기
                Button("취소") { }
            },trailing:
                HStack {
                    Button("저장")
                    { /*code*/ }
                }
        )
    }
}
役に立つ文章
**
You can create a custom back button in your navigation link by hiding native navigationBackButton. In the custom back button, you can add your translated custom back button title.
https://stackoverflow.com/a/59822675/15746954