开发者

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).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜