可点击的导航栏标题 [英] Clickable Navbar title
本文介绍了可点击的导航栏标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使导航栏的标题可单击.就像在Facebook应用程序中一样.当您单击它时,它将关闭视图控制器.
How can I make the title of a navbar clickable. Much like in the facebook application. Were when you click it it dismisses the view controller.
推荐答案
将 UIButton
设置为UINavigationItem的 titleView
.阅读 UINavigationItem类参考
set a UIButton
as UINavigationItem's titleView
.. add an action to that button.. for more details read UINavigationItem class reference
这篇关于可点击的导航栏标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文