How to remove UINavigationbar prompt programmatically?

醉酒当歌 提交于 2019-12-10 13:17:56

问题


I have a view controller, and I set the navigation bar with prompt in IB. But I want to remove the prompt and make the bar as "1 line" sometimes. how can I do it in code?


回答1:


[[self navigationItem] setPrompt: nil];

This animates the removal of the prompt.



来源:https://stackoverflow.com/questions/7049608/how-to-remove-uinavigationbar-prompt-programmatically

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!