1

I'm trying to go from viewController to Another

my problem is that the back button is showing as "<" and not "< Back" and i didn't understand why, especially cause i'm able to go from this viewController to another one, and the back button is perfect

do anyone faced the same problem ? and how could i solve it ?

Anthony Shahine
  • 2,477
  • 3
  • 18
  • 24

3 Answers3

0

Without looking at code is kinda hard to see, but if you want to workaround it you can take a look at the many other answers on how to change the back button title

Community
  • 1
  • 1
jalone
  • 1,953
  • 4
  • 27
  • 46
0

This can happen if the title of the new view controller is too long. I think the system in this scenario will favor removing "back" in order to make room for the long title

So try shortening the view controller title

MobileMon
  • 8,341
  • 5
  • 56
  • 75
0

You can customize the text of the back button with the following code...

override func prepare(for segue: UIStoryboardSegue, sender: Any?) {

    // your segue prep code
    self.navigationController?.navigationBar.topItem?.title = "Back"


}
Adrian
  • 16,233
  • 18
  • 112
  • 180