title: Rotate iAd with orientation change (iPhone/iPad)
body: <p>I have a Universal app (iPhone/iPad) which has an iAd displayed at the bottom of the view.</p>
  
  <p>I use the following code to position it on view load;</p>
  
  <pre><code>- (void)viewDidLoad {
  
      bannerIsVisible = YES;
  ADBannerView *adView = [[ADBannerView alloc] initWithFrame:CGRectZero];
  
      float origin_y;
      if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) 
          origin_y = 360.0;
      else
          origin_y = self.view.frame.size.height;
  
      adView.frame = CGRectMake(0.0,origin_y, adView.frame.size.width, adView.frame.size.height);
  adView.delegate = self;
  
      if ( &amp;ADBannerContentSizeIdentifierPortrait != NULL ) {
          adView.requiredContentSizeIdentifiers = [NSSet setWithObject:ADBannerContentSizeIdentifierPortrait];
          adView.currentContentSizeIdentifier = ADBannerContentSizeIdentifierPortrait;
  
  else  {
          adView.requiredContentSizeIdentifiers  = [NSSet  setWithObject:ADBannerContentSizeIdentifier320x50];
          adView.currentContentSizeIdentifier  = ADBannerContentSizeIdentifier320x50;
      }
  
      [self.view  bringSubviewToFront:adView];
  [webView  addSubview:adView];
  
      [super  viewDidLoad];
  }
  </code></pre>
  
  <p>Now I want to support all 4 orienations i.e. the iAd should move to the bottom on all the 4 orienations </p>
  
  <p>So my question is simply how do I update the following code to support the same;</p>
  
  <pre><code>(BOOL)shouldAutorotateToInterfaceOrientationUIInterfaceOrientation)interfaceOrientation {
      // Return YES for supported orientations
      return  YES;
  }
  </code></pre>
  
  <p>Please note 2 things;
   1. I need the same code to work on both iPhone/iPad
   2. I am ready to update the fixed value of origin_y from 360.0 to whatever you can suggest.</p>
  
  <p>Thank you.</p>