在iOS6中,不推荐使用shouldAutorotateToInterfaceOrientation
。我尝试使用supportedInterfaceOrientations
和shouldAutorotate
来使应用程序正确地工作于自动旋转,但失败了。
这个ViewController我不想旋转,但它不工作。
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
-(BOOL)shouldAutorotate
{
return NO;
}
-(NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskPortrait;
}
有什么想法吗?提前感谢大家的帮助!
https://stackoverflow.com/questions/12662240
复制相似问题