iphone - 在 UIViewController 上启用界面方向

标签 iphone ios uiwebview uiinterfaceorientation

<分区>

Possible Duplicate:
shouldAutorotateToInterfaceOrientation is not working in iOS 6

我正在使用 xcode 4.5,我只需要在一个包含 webview 的 viewController 上启用界面方向。我怎样才能启用它。

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

最佳答案

相反,您可以使用这个 UIViewController

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

    -(NSUInteger) supportedInterfaceOrientations{

        return UIInterfaceOrientationMaskAllButUpsideDown; //supports all but upside-down
}

关于iphone - 在 UIViewController 上启用界面方向,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13619918/

上一篇:iphone - 应用商店提交 "Please use a provisioning profile associated with Team ID ........"

下一篇:objective-c - iOs 从 NSURLConnection 接收到的数据为零

相关文章:

iphone - 双击缩放崩溃并在 iOS 中显示无法识别的扇区

ios - 无法检测到内存泄漏Xcode

iphone - 如何在 iPhone 上扩展键盘渐变?

iphone - TableView :indexPathForCell returns nil

iphone - iPhone 4相机拍摄的照片分辨率是多少?

iphone - GPUImageMovie 播放控件

ios - 在 UINavigationItem 中使用 Text 或 UIImage 作为标题性能更高

ios - APNS - 将应用程序从生产中转移到开发中

iphone - UIWebView:加载某些 URL 时未调用 webViewDidStartLoad/webViewDidFinishLoad 委托(delegate)方法

ios - iOS中webView可以加载本地存储文件吗?