Animating UINavigationBar
I want to slide the right button and the title in and out (ins开发者_运维技巧tead of having things just appear and disappear). How can I go about doing this?
Instead of using property setter syntax, i.e. self.navigationController.navigationBarHidden = NO, use the method setter to specify an animated parameter:
[self.navigationController setNavigationBarHidden:NO animated:YES];
This should achieve what you want.
You can (sort of) animate the title by using a custom view for UINavigationItem's titleView
property and doing the animation yourself. As for the right button, you can't animate it without completely rewriting UINavigationBar (not recommended).
精彩评论