Hi All,
I am making an ipad application using webview on one of my viewController class where the data comes from the HTML.
While doing the fast rotation from landscapeLeft to landscapeRight or portraitLeft to portraitUpsideDown my view is not showing the webview containing the data comes from HTML but the image that i have placed on the background of the view is showing. The webview moves to the right side. To show the webview i need to scroll it from the right.
When i debug the application it goes properly in the - shouldAutorotateToInterfaceOrientation

UIInterfac eOrientation)interfaceOrientation
- (BOOL)shouldAutorotateToInterfaceOrientation

UIIn terfaceOrientation)interfaceOrientation
{
if (interfaceOrientation == UIInterfaceOrientationPortrait ||
interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown )
{
currentorientation=@"Portrait";
flag=TRUE;
[self updateLandscapeView];
NSLog(@"shoud ayto rotate portrait");
return UIInterfaceOrientationIsPortrait(interfaceOrientat ion);
}
else if (interfaceOrientation == UIInterfaceOrientationLandscapeLeft ||
interfaceOrientation == UIInterfaceOrientationLandscapeRight )
{
currentorientation=@"Landscape";
[self updateLandscapeView];
NSLog(@"shoud ayto rotate landscape");
return UIInterfaceOrientationIsLandscape(interfaceOrienta tion);
}
return YES;
}
- (void)updateLandscapeView
{
UIScrollView *scrollView = [[myWebView subviews] lastObject];
[scrollView setContentSize:CGSizeMake(0,scrollView.contentSize .height)];
if([currentorientation isEqualToString:@"Landscape"])
{
[appDeleg setOrient:@"Landscape"];
[aboutImgView setFrame:CGRectMake(0, 0,1024, 768)];
aboutImgView.image = [UIImage imageNamed:@"bg1.png"];
[myWebView setFrame:CGRectMake(0, 0, 1024, 768)];
if(flag==FALSE)
{
myWebView.frame=CGRectMake(0, 0, 1024, 700);
flag=TRUE;
}
[self loadWebView];
}
//else if([[UIDevice currentDevice] orientation] == UIDeviceOrientationPortrait | [[UIDevice currentDevice] orientation] == UIDeviceOrientationPortraitUpsideDown)
else if([currentorientation isEqualToString:@"Portrait"])
{
[appDeleg setOrient:@"Portrait"];
[aboutImgView setFrame:CGRectMake(0, 0,768, 1024)];
aboutImgView.image = [UIImage imageNamed:@"bg.png"];
[myWebView setFrame:CGRectMake(0, 0, 768, 1024)];
[self loadWebView1];
}
}
Hope a positive response from your side.
Jennifer