title: UIImageView and Window Orientation Problem
body: <p><strong>WHAT I WANT TO DO</strong></p>
  
  <p>What I want is an imageview on top of the application, which I can control it's appearance. For example, in the homepage I don't want the banner, but in another view I do. That means that if I do want to have the banner, I have to shift down the whole view.</p>
  
  <p><strong>WHAT I'VE DONE</strong></p>
  
  <p>The following is within my App Delegate. Basically, I am shifting the view of the customTabBarController down 145 px for the banner.</p>
  
  <pre><code>if ([self.customTabBarController interfaceOrientation] == UIInterfaceOrientationPortrait) {
  
  [customTabBarController.view setFrame:CGRectMake(0, 145, 768,1024-145)];
  banner = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 768, 145)];
  
  }
  else if ([self.customTabBarController interfaceOrientation] == UIInterfaceOrientationPortraitUpsideDown) {
  
      [customTabBarController.view setFrame:CGRectMake(0,0, 768,1024-145)];
      banner = [[UIImageView alloc] initWithFrame:CGRectMake(0, 768+145, 768, 145)];
  
  }
  
  banner.image = image;
  
  banner.hidden = NO;
  
  [self.window addSubview:banner];
  </code></pre>
  
  <p><strong>WHAT THE PROBLEM IS</strong></p>
  
  <p>Now, I've done the portrait orientation part, but when I try to change orientations, the image changes orientation along too; meaning the image turns sideways when I change the iPad to landscape and upside down. Basically, it stays at one side of the iPad at all times.</p>
  
  <p>Can anyone please help? Suggestions on other methods are welcome too. </p>
  
  <p>EDIT: I realize I didn't implement the setFrame for landscape orientation, but I wanted to finish implementing it for upside down portrait orientation first, but the code does not work. What the application looks like when it's upside down is the banner is on the bottom and the image is upside down.</p>