UINavigationBar Hide back Button Text(UINavigationBar 隐藏按钮文本)
问题描述
如何隐藏 UINavigation 控制器的后退按钮文本?我只会有<"而不是<返回"
How can I hide the Back Button Text from an UINavigation Controller? I will only have the "<" and not "< Back"
推荐答案
在界面构建器中,可以选择上一个控制器的导航项,更改Back Button
字符串到您希望后退按钮显示的内容.如果你想让它空白,例如,只需放置一个空格.
In the interface builder, you can select the navigation item of the previous controller and change the Back Button
string to what you'd like the back button to appear as. If you want it blank, for example, just put a space.
你也可以用这行代码改变它:
[self.navigationItem.backBarButtonItem setTitle:@"Title here"];
或者在 Swift 中:
self.navigationItem.backBarButtonItem?.title = ""
这篇关于UINavigationBar 隐藏按钮文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:UINavigationBar 隐藏按钮文本


基础教程推荐
- :hover 状态不会在 iOS 上结束 2022-01-01
- “让"到底是怎么回事?关键字在 Swift 中的作用? 2022-01-01
- Android ViewPager:在 ViewPager 中更新屏幕外但缓存的片段 2022-01-01
- Android文本颜色不会改变颜色 2022-01-01
- LocationClient 与 LocationManager 2022-01-01
- 在 iOS 上默认是 char 签名还是 unsigned? 2022-01-01
- 使用 Ryzen 处理器同时运行 WSL2 和 Android Studio 2022-01-01
- 固定小数的Android Money Input 2022-01-01
- 如何使 UINavigationBar 背景透明? 2022-01-01
- 如何使用 YouTube API V3? 2022-01-01