title: set the frame size when orientation is changed in ios
body: <p>I want to change the orientation of a view in ios 6. When the orientation is changed, I want to set the frame size of the views.</p>
  
  <p>My Sample Code for orientation change:</p>
  
  <pre><code>-(BOOL)shouldAutorotate
  {
      return YES;
  }
  
  -(NSInteger)supportedInterfaceOrientations
  {
      NSInteger mask = 0;
  
      intOrientation = [[UIApplication sharedApplication] statusBarOrientation];
      if(intOrientation == UIInterfaceOrientationPortrait || intOrientation == UIInterfaceOrientationPortraitUpsideDown)
      {
          mask |= UIInterfaceOrientationMaskPortrait;
      } else 
          if(intOrientation == UIInterfaceOrientationLandscapeLeft)
          {
              mask |= UIInterfaceOrientationMaskLandscapeLeft;
          }
      }
      NSLog (@"mask %d",mask);
      return mask;
  }
  
  // Here now mask value is 2 because my default mode is portrait. 
  </code></pre>
  
  <p>Now when I change my orientation to landscape, I want to set the frame size. Please guide me on how to do that.</p>
  
  <p>ok..Can I set the frame size for the view like dis by taking the version and comparing it in viewdidLoad: </p>
  
  <pre><code>orientation = [[UIDevice currentDevice] orientation];
  
  NSString *reqSysVer = @"6.0";
  NSString *currSysVer = [[UIDevice currentDevice] systemVersion];
  NSLog (@"ios version %@",currSysVer);
  if ([currSysVer compare:reqSysVer options:NSNumericSearch] != NSOrderedAscending)
  {
      if (orientation == UIInterfaceOrientationMaskPortrait) {
          self.view.frame = CGRectMake(0, 0, 1000, 800);
  
  
          self.tableView1.frame = CGRectMake(1, 0, 764,510);
  
      }
      else if (orientation == UIInterfaceOrientationMaskLandscapeLeft)
      {
          self.view.frame = CGRectMake(0, 0, 1300, 370);
          self.tableView1.frame = CGRectMake(0, 0, 1300, 370);
          self.view.backgroundColor = [UIColor blackColor];
  
      }
  
  }
  </code></pre>