简体   繁体   中英

Navigationbar does not animate when using translucent barstyle

This does not work

[self.navigationController setNavigationBarHidden:YES animated:YES];

when I have this barstyle

rootNavigationController.navigationBar.barStyle = UIBarStyleBlackTranslucent;

Is it any reason why it shouldn't animate away? Are there any fixes to this?

EDIT

This is NOT working:

[rootNavigationController.navigationBar setBarStyle:UIBarStyleBlack];
[rootNavigationController.navigationBar setTranslucent:YES];

The UIBarStyleBlackTranslucent is deprecated. Use UIBarStyleBlack and set the translucent property to YES instead.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM