在UIViewController上启用接口方向

Rah*_*diq 0 iphone uiwebview uiinterfaceorientation ios

可能重复:
shouldAutorotateToInterfaceOrientation在iOS 6中不起作用

我正在使用xcode 4.5,我只需要在一个包含webview的viewController上启用接口方向.我该如何启用它.

- (BOOL)shouldAutorotateToInterfaceOrientation 似乎在iOS6中已弃用

NSU*_*ult 5

相反,你可以使用这个UIViewController

-(BOOL) shouldAutorotate{
        return YES; //supports all
    }

    -(NSUInteger) supportedInterfaceOrientations{

        return UIInterfaceOrientationMaskAllButUpsideDown; //supports all but upside-down
}
Run Code Online (Sandbox Code Playgroud)