title: why the addview doesn't fit in the width
body: <p>I want to display addview to the bottom of my screen, my app is universal so I use this code in viewdidload </p>
  
  <pre><code>if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
          {
              if (orientation == UIDeviceOrientationPortrait || orientation == UIDeviceOrientationPortraitUpsideDown)
              {
                  adView= [[ADBannerView alloc] initWithFrame:CGRectMake(0, self.view.frame.size.height - 80.0f, 320.0f, 40)]; 
  
              }
              else 
              {
                  NSLog(@"///////////////////////////// I'm here /////////////////////");
                  adView= [[ADBannerView alloc] initWithFrame:CGRectMake(0, self.view.frame.size.height - 80.0f, 1024 , 40)]; 
  
  
              }
          }
          else
          {
              if (orientation == UIDeviceOrientationPortrait || orientation == UIDeviceOrientationPortraitUpsideDown)
              {
                  adView= [[ADBannerView alloc] initWithFrame:CGRectMake(0, self.view.frame.size.height - 40.0f, 320.0f, 40)]; 
  
              }
              else 
              {
                  adView= [[ADBannerView alloc] initWithFrame:CGRectMake(0, self.view.frame.size.height - 40.0f, 1024 , 40)]; 
  
  
              }
  
          }
  
          [adView setAutoresizingMask: UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleTopMargin  | UIViewAutoresizingFlexibleLeftMargin];
          //adView.currentContentSizeIdentifier = ADBannerContentSizeIdentifier320x50;
  
  
  
  
          [self.view addSubview: adView];
          [self.view bringSubviewToFront:adView];
  </code></pre>
  
  <p>the problem is that the view never work in iphone and not work well fill the width in ipad</p>
  
  <p>any idea how to solve that 
  <img src="https://i.stack.imgur.com/1g7pV.png" alt="enter image description here">
  Best regards </p>