title: IOS 6 view controller incorrect width / bounds - landscape mode
body: <p>My app utilizes both landscape mode and portrait mode and the user can switch between the two at will.  </p>
  
  <p>When a view controller is presented by a parent view controller that is in <strong>portrait orientation</strong>, the opened view controller will have the <strong>correct width &amp; frame</strong>.</p>
  
  <p>However, if the parent view controller is in <strong>landscape mode</strong>, then on IOS6 (it works correctly on IOS7), the child view controller will be <strong>too large</strong> and actually a little too short also when it is presented.  </p>
  
  <p>Note this is not because the values are reported incorrectly since [[UIScreen mainScreen] bounds] reports the same values regardless of the orientation the child controller is loaded in.</p>
  
  <p>Any ideas on how to fix this / why this is happening?  Any idea on how to force the IOS6 versions to behave like IOS7 is now behaving natively?  Many thanks!!!</p>
  
  <p>Edit::
  Here's how the vc's are presented: </p>
  
  <p>AppDelegate</p>
  
  <pre><code>Launch1 *launch1 =[[Launch1 alloc] init];
  self.window.rootViewController = launcher;
  [self.window makeKeyAndVisible];
  </code></pre>
  
  <p>Launch1 class</p>
  
  <pre><code>Search *search = [[Search alloc] init];
  [self presentViewController:search animated:YES completion:nil];
  </code></pre>
  
  <p>Search class</p>
  
  <pre><code>//load list_container
  views = [[Search_custom_views alloc] initWithControllerContext:self];
  [self.view addSubview:views];
  </code></pre>
  
  <p>Search_custom_views UIView extension:</p>
  
  <pre><code>- (id)initWithControllerContext:(UIViewController*)contextstart {
  
      //set size of the screen
      CGRect screenRect = [[UIScreen mainScreen] bounds];
  
      self = [super initWithFrame:screenRect];
  
      if (self) {
       ....
  </code></pre>