问题
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