隐藏导航栏的标题而不删除它 [英] Hide title of navigation bar without removing it
本文介绍了隐藏导航栏的标题而不删除它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个带图像背景的自定义导航栏。我想在背景上显示标题,但我需要在下一个视图中显示后退按钮的文本。
I have a customized navigation bar with a image background. I do want to show the title on the background but I need its text for the back button in the next view.
self.title = @
不会(自然地)在前一个标题的后退按钮中。
self.title=@""
will not put (naturally) in the back button the previous title.
推荐答案
根据pheekicks的建议,我找到了一个提示:
Based on the suggestion of pheekicks, I found a tip to do it:
UILabel *label = [[UILabel alloc] init];
self.navigationItem.titleView = label;
这篇关于隐藏导航栏的标题而不删除它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文