Proper way to hide status bar on iOS, with animation and resizing root view
Consider a view controller that needs to slide out (or hide) the status bar when a button is clicked. - (void) buttonClick:(id)sender { [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide]; } The above effectively hides the status bar, but does not resize the root view appropriately, leaving a 20 pixel gap on top. What I expected is the root view to expand over the space that was previously used by the status bar (animated, with the same duration than the status bar animation). What's the proper way of doing this? (I'm aware there are plenty of