Question: I have one issue which i can't handle with it. I have two view controllers and I use `[[UIApplication sharedApplication] setStatusBarHidden:isHidden withAnimation:UIStatusBarAnimationSlide];` to show/hide status bar. All works pefect but I need one thing: everything is embed in navigation controller and after hiding status bar navigation bar is moving up for 20 px. How can I remove this effect? With or without status bar i want navigation bar at the same place in every time.

Edit1: I've already done this

```
-(void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    self.navigationController.navigationBar.layer.transform = CATransform3DIdentity;
    [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationSlide];
}

-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    self.navigationController.navigationBar.layer.transform = CATransform3DMakeTranslation(0, 20, 0);
}

```

It works but animation is terrible and i need something better.

Answer: 
There's no clean way to prevent UINavigationController from adjusting the height of its navigation bar. I describe the behavior in detail in [this SO answer](https://stackoverflow.com/questions/18294872/ios-7-status-bar-back-to-ios-6-style/18855464#18855464).

The only workaround currently is that UINavigationController only performs those height adjustments whenever it's view's bounds matches the bounds of the window, i.e., if the navigation controller's view fills the screen. If the view's bounds are off, even by a pixel, it will default to a standard 44 point high navigation bar.

Karah's answer above is incorrect. `UIViewControllerBasedStatusBarAppearance` is used to determine the color and visibility of the status bar. It has nothing to do with UINavigationController's nav bar height logic.
There no clear way to do this, but you can set this thing by using following code in ViewDidLoad :

```
    CGRect statusFrame = CGRectMake(0.0, -20.0, 1024, 20);
    UIView* statusBar = [[UIView alloc] initWithFrame:statusFrame];
    statusBar.backgroundColor = [UIColor blackColor];
    [self.view addSubview:statusBar];
    [statusBar release];

```