[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
Reference
この問題について([iOS]ナビゲーションBarItemsの変更), 我々は、より多くの情報をここで見つけました https://velog.io/@iooi75/iOS-navigationBarItems-바꾸기テキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol