iOS Storyboard 后退按钮

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/24693248/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 01:20:16  来源:igfitidea点击:

iOS Storyboard Back Button

iosxcode

提问by Jacob Jones

Im trying to create "push" screen. And My back button text is "Back" despite of his "father" screen title. Moreover, when I try to change text in interface builder of Xcode, it doesn't change my back button text. How can I change it by using Xcode interface builder (storyboard)?

我正在尝试创建“推送”屏幕。尽管他的“父亲”屏幕标题是“后退”,但我的后退按钮文本是“后退”。此外,当我尝试在 Xcode 的界面构建器中更改文本时,它不会更改我的后退按钮文本。如何使用 Xcode 界面构建器(故事板)更改它?

回答by Keenle

Here is what you need to do: CustomBack_XCODE

以下是您需要做的: 自定义返回_XCODE

Result:

结果:

CustomBack_SIMULATOR

CustomBack_SIMULATOR

Important:you should specify Back Button text not for the VC where you see back button but for the VC that is the "parent" of the desired screen.

重要提示:您不应为您看到后退按钮的 VC 指定后退按钮文本,而是为作为所需屏幕“父”的 VC 指定后退按钮文本。

回答by F1ank3r

Is by any chance the title very long? In that case the back button text will be changed to localized 'Back'. If that is the case try with shorter text or specify a shorter text in the father's navigation item back button property.

标题是不是很长?在这种情况下,后退按钮文本将更改为本地化的“后退”。如果是这种情况,请尝试使用较短的文本或在父亲的导航项后退按钮属性中指定较短的文本。