In my application by default status bar is visible. And my app supports landscape as well as portrait orientations.
When I want to play the video, i'm hiding the status bar, so that my video will be shown full screen. And when video completes, i'm bringing the status bar back.

Now the problem:
My app is in landscape now, on click of a button, i'll hide the status bar and starts playing video. When video is playing, i change the orientation of the phone to portrait and I allowed video to complete. When video completed, the device is still in portrait mode, player view is removed and status bar is shown again. Now I noticed that my portrait view is moved 20 pixels up and over that the status bar is showing. But when I started the app for firs time, status bar is shown first and below it, my view is shown.

If you tweak this category a bit by declaring it on UIViewController, and making sure it adjusts controller.view.frame rather than navigationBar.top, I think you'll be good to go. Just make sure to call the category method on your view controller after your movie finishes playing and you've already shown the status bar.

And just for the sake of staving off any confusion, it's probably worth mentioning you need to use the width of the status bar in landscape mode because UIWindow's coordinate system always works as though it's in portrait, despite how you hold the device. This is in contrast to subviews (UIView instances) that get managed by a UIViewController, which benefit from automatic coordinate transformations.

P.S.: Since you're going to have to tweak your view's frame in a window context, this function may also help.