title: Orientation issues with Tab Bar Controller In WebView
body: <p>I am new to iphone development. In my app, i am using number of viewControllers, web view, Tool bar, Tab Bar and so on. Here, i want to achieve orientation(portrait or landscape or vice versa) corresponding device view in all the web views. I could achieve orientation in all web views except those web views are coming under the tab bar controller web view(it may be an one of tab bar view controller or sub view of tab bar controller view). </p>
  
  <p>Here i adding web view by using below code,</p>
  
  <pre><code>  contentView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
    contentView.autoresizingMask = (UIViewAutoresizingFlexibleWidth |                  UIViewAutoresizingFlexibleHeight);
    self.view = contentView;
    self.view.autoresizesSubviews = YES;
  
  
    CGRect webFrame = [[UIScreen mainScreen] applicationFrame];
    webFrame.origin.y -= 20.0;
  
    webView1 = [[UIWebView alloc] initWithFrame:webFrame];
  
    [contentView addSubview:webView1]; 
  </code></pre>
  
  <p>and using below methods for achieving orientation,</p>
  
  <pre><code>- (BOOL) shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation) orientation 
   {
  
    return YES;
   }
  
  
   - (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
       {
             if(fromInterfaceOrientation == UIInterfaceOrientationPortrait){
             [webView1 stringByEvaluatingJavaScriptFromString:@"rotate(0)"];
  
       }
  </code></pre>
  
  <p>else
        {</p>
  
  <pre><code>   [webView1 stringByEvaluatingJavaScriptFromString:@"rotate(1)"];
   }
  </code></pre>
  
  <p>}</p>
  
  <p>please any one give soln!</p>