All is fine when I hide both my navigationBar and my statusBar, but when I want to show both again, I end up with this 20px white space under the navigationBar, and the navigationBar is also 20px too high under the returned statusBar. See screenshot below after the code:
Code I'm using:
I appreciate any help.
Thank you in advance!
Code I'm using:
Code:
- (void)toggleNavBar:(UITapGestureRecognizer *)gesture
{
BOOL barsHidden = self.navigationController.navigationBar.hidden;
[self.navigationController setNavigationBarHidden:!barsHidden animated:YES];
if (!barsHidden)
{
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide];
}
else if (barsHidden)
{
[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationSlide];
}
}

I appreciate any help.
Thank you in advance!
Last edited: