当我从纵向模式切换到横向模式时,视图应该扩大,但长度应该相同并且在滚动视图中,这样当我滚动时应该显示完整内容:
if (([[UIDevice currentDevice]orientation] == UIInterfaceOrientationLandscapeLeft) ||
([[UIDevice currentDevice]orientation] == UIInterfaceOrientationLandscapeRight))
{
UIScrollView *scrollView=[[UIScrollView alloc] init];
UIView *view1 = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 480, 480)];
view1 = self.view;
[scrollView addSubview:view1];
scrollView.frame = CGRectMake(0, 0, 480, 480);
scrollView.contentSize = CGSizeMake(480, 480);
scrollView.delegate = self;
scrollView.alwaysBounceVertical = YES;
[self.view addSubview:scrollView];
}