ios 6中如何禁止横屏- (BOOL)shouldAutorotate{return NO;}把plist里面的Supported interface orientation 相关横屏的设置删掉后
- (BOOL)shouldAutorotateToInterfaceOrientation:UIInterfaceOrientation)interfaceOrientation
{
return UIInterfaceOrientationIsPortrait(interfaceOrientation);
}
以上方法都试过了,无效
- (BOOL)shouldAutorotateToInterfaceOrientation:UIInterfaceOrientation)interfaceOrientation
{
return UIInterfaceOrientationIsPortrait(interfaceOrientation);
}
以上方法都试过了,无效
2. 这个方法是可以用的,如果不能用,可能是哪里出了问题- (BOOL)shouldAutorotateToInterfaceOrientation:UIInterfaceOrientation)interfaceOrientation
{
return UIInterfaceOrientationIsPortrait(interfaceOrientation);
}
- (BOOL)shouldAutorotate
{
return NO;
}
-(NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskPortrait;
}建议你参考 blog.csdn.net/totogogo/article/details/8002173
{
return UIInterfaceOrientationMaskPortrait;
}