0
我的应用程序在肖像模式下正常启动并且效果很好,但在我的应用程序中某些视图仅支持横向模式和一些横向和肖像,当我切换应用程序视图仅从景观支持的一些观点,即同时支持方向和旋转设备,以肖像和点击返回按钮,景观视图不会自动旋转Iphone肖像模式切换回风景模式不自动工作
我用下面的代码来设置定向
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return YES;
}
- (BOOL)shouldAutorotate
{
return YES;
}
- (NSInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscapeLeft;
}
谢谢