How do you keep the arrow but remove the text from all back buttons with the newest version of SwiftUI?
Remove Back Button Text for Entire App
You can’t do this yet in SwiftUI.
In UIKit you would do something like this:
You could also use UIViewControllerRepresentable to create your own UINavigationController and embed your views inside that. To change the back button you would do this:
Hopefully a lot of navigation features from UIKit come to SwiftUI this year.
In UIKit you would do something like this:
Code Block Swift navigationItem.backButtonDisplayMode = .minimal
so you could try to implement this into your views.You could also use UIViewControllerRepresentable to create your own UINavigationController and embed your views inside that. To change the back button you would do this:
Code Block Swift navigationBar.topItem?.backButtonDisplayMode = .minimal
Hopefully a lot of navigation features from UIKit come to SwiftUI this year.
You can set the .navigationTitle("") of the previous screen to an empty text. This will only work with iOS 14+ as navigationTitle is not available before.
You can set the .navigationTitle("") of the previous screen to an empty text. This will only work with iOS 14+ as navigationTitle is not available before.