首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >如何在iOS 6中让app完全正确地进行自动旋转?

如何在iOS 6中让app完全正确地进行自动旋转?
EN

Stack Overflow用户
提问于 2012-09-30 23:03:48
回答 1查看 16.2K关注 0票数 17

在iOS6中,不推荐使用shouldAutorotateToInterfaceOrientation。我尝试使用supportedInterfaceOrientationsshouldAutorotate来使应用程序正确地工作于自动旋转,但失败了。

这个ViewController我不想旋转,但它不工作。

代码语言:javascript
运行
复制
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

-(BOOL)shouldAutorotate
{
    return NO;
}

-(NSUInteger)supportedInterfaceOrientations
{
    return UIInterfaceOrientationMaskPortrait;
}

有什么想法吗?提前感谢大家的帮助!

EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/12662240

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档