With iOS 6 Apple modified the way to control the views orientation. Now is managed by the UIWindow root controller.
When the root controller is an object of classes INavigationController or UITabBarController, we hava a problem. This controllers allow allways the orientation change.
To solve this problem use the following code: