when i shift from portrait mode to landscape mode the view should expand widely but the length should be the same and in scrollview so that when i scroll the fullcontents should be displayed:
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];
}
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];
}