通常,我的应用程序以纵向模式显示所有视图,但报告视图除外。仅当我在设置视图中并将设备旋转到横向模式时才会显示报告视图。现在,当我再次将设备旋转到纵向模式时,报告视图被关闭并显示设置视图。
In report view
> shouldAutorotateToInterfaceOrientation
return ((interfaceOrientation == UIInterfaceOrientationLandscapeRight)||( interfaceOrientation == UIInterfaceOrientationLandscapeLeft));
Here at settings view
shouldAutorotateToInterfaceOrientation
if((interfaceOrientation == UIInterfaceOrientationLandscapeRight)||( interfaceOrientation == UIInterfaceOrientationLandscapeLeft))
{
Report *report = [[Report alloc]initWithNibName:@"Report" bundle:[NSBundle mainBundle]];
[self.navigationController pushViewController:report animated:YES];
[report release];
}
return YES;
}