title: iPad start in Landscape receive only touch within 768x768
body: <p>It works perfect fine when starting in portrait and also works when you rotate from portrait to landscape and back.</p>
  
  <p>It does not work when starting in landscape. But then it works when you rotate from landscape to portrait and back.</p>
  
  <p><strong>In landscape starting mode, the screen does not respond with any touch where screen coordinateX greater than 768.</strong></p>
  
  <p>What happens in code is, I use status bar orientation to determine original orientation and rotate each view manually. The views display correctly but does not receive touch properly.</p>
  
  <p>Then my root view controller will get called when ipad start rotating with:</p>
  
  <pre><code>- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
  </code></pre>
  
  <p>which will rotate every subviews.</p>
  
  <p>Root controller:</p>
  
  <pre><code>- (void)loadView {
      self.view = [[UIView alloc]init ]; 
      //initialize child views
      [self willRotateToInterfaceOrientation:0 duration:0];    
  
  }
  
  - (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration { 
      if ([model isLandscape]) {
          self.view.frame = CGRectMake(0, 0, 1024, 768-80);
      }
      else {
          self.view.frame = CGRectMake(0, 0, 768, 1024-80);
      }
      //rotate child views  
  }
  </code></pre>
  
  <p>My code [model isLandscape] works so I don't need to provide details as to how it works but here are the code anyway:</p>
  
  <pre><code>- (bool)isLandscape {
      if (orientation == UIInterfaceOrientationLandscapeLeft || orientation == UIInterfaceOrientationLandscapeRight) 
          return true;
      else 
          return false;
  }
  
  -(id) init
  {
      [[NSNotificationCenter defaultCenter] addObserver:self   selector:@selector(orientationChanged:) name:UIDeviceOrientationDidChangeNotification object:nil];
  }
  
  - (void)orientationChanged:(NSNotification *)notification
  {
      UIInterfaceOrientation curOrientation = [[UIDevice currentDevice] orientation];
      if (curOrientation == UIDeviceOrientationPortrait ||
          curOrientation == UIDeviceOrientationPortraitUpsideDown ||
          curOrientation == UIDeviceOrientationLandscapeLeft ||
          curOrientation == UIDeviceOrientationLandscapeRight)
      {
          orientation = curOrientation;
          ((AppDelegate*)([UIApplication sharedApplication].delegate)).savedOrientationForRestart = orientation;
          NSLog(@"changed");
      }
  }
  
  -(void)validateOrientation { //first time when initializing orientation
      UIInterfaceOrientation curOrientation = [[UIDevice currentDevice] orientation];
      if (curOrientation != UIDeviceOrientationPortrait &amp;&amp;
          curOrientation != UIDeviceOrientationPortraitUpsideDown &amp;&amp;
          curOrientation != UIDeviceOrientationLandscapeLeft &amp;&amp;
          curOrientation != UIDeviceOrientationLandscapeRight)
      {
          orientation = [[UIApplication sharedApplication] statusBarOrientation];
      }
  
  }
  </code></pre>