Storyboard UINavigation Controller Back Button Text

后端 未结 2 1047
夕颜
夕颜 2021-01-06 20:40

In XCode 4.5.1 creating a storyboard app with a Navigation controller, I am having a hard time trying to set the BACK button for any view controllers that are pushed. I\'m

相关标签:
2条回答
  • 2021-01-06 21:01

    The back button will show the title of the previous view and if no title is set it'll show 'Back'.

    So in your prepareForSegue method, you can change the title of the current view before the next view is pushed. The back button will then show whatever you set the title to.

    0 讨论(0)
  • 2021-01-06 21:14

    The accepted answer is a hack, this is the way to do it...

    1. Open StoryBoard
    2. In Document Outline window find ViewController to which you want to return to
    3. Click on Navigation Item of that ViewController
    4. In Attributes explorer change Back Button value to your custom tile

    That is it, enjoy...

    0 讨论(0)
提交回复
热议问题