小编use*_*125的帖子

当方向在ios 7中上下颠倒时,视图不会旋转

我想让应用程序支持所有方向.它的工作正常,但只有颠倒的方向不起作用.我正在使用ios7.对于倒置,视图不会旋转.我试过以下代码

-(BOOL)shouldAutorotate  
{
return yes;
}
-(NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskAll; // etc
}
Run Code Online (Sandbox Code Playgroud)

我唯一的第二种方法是调用但不是第一种方法.在infoPlist中,我启用了所有支持的方向.

iphone objective-c uiinterfaceorientation ios7

2
推荐指数
1
解决办法
1429
查看次数