我想让应用程序支持所有方向.它的工作正常,但只有颠倒的方向不起作用.我正在使用ios7.对于倒置,视图不会旋转.我试过以下代码
-(BOOL)shouldAutorotate
{
return yes;
}
-(NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskAll; // etc
}
Run Code Online (Sandbox Code Playgroud)
我唯一的第二种方法是调用但不是第一种方法.在infoPlist中,我启用了所有支持的方向.