开发者

Animating UINavigationBar

开发者 https://www.devze.com 2023-01-13 04:59 出处:网络
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.

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

精彩评论

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