IOS 8 - an animation showing that the navigation bar and status bars are not working properly

I am trying to combine a navigation bar and a status bar. In previous versions of iOS, the following code worked fine:

[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:YES];
[self.navigationController setNavigationBarHidden:NO animated:YES];

Is iOS 8, this causes the navigation bar animation to move too far and then back. I can solve the problem by removing the animation for the status bar and showing it instantly. However, this does not look so good.

Has anyone else encountered this problem or was aware of a fix?

Thank!

+4
source share
1 answer

Well, I found a solution. Change the animation order.

[self.navigationController setNavigationBarHidden:NO animated:YES];
[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:YES];
+3
source

All Articles