title: AdBannerView moves to top of superview after bannerViewActionDidFinish: Bug or Not?
body: <p>Feel free to reference a sample Xcode project hosted on GitHub which demonstrates this issue: <a href="https://github.com/BigSauce/IAdBannerBugDemo" rel="nofollow noreferrer">IAdBannerBugDemo</a></p>
  
  <p>When there is an AdBannerView being displayed underneath a UITableView and above a UITabBar, after <code>bannerViewActionDidFinish:</code> is invoked, the AdBannerView is erroneously moved to the top of its superview.</p>
  
  <p>My questions are:</p>
  
  <ol>
  <li>Is there a valid workaround for this that isn't a hand jam?  If so, what is the workaround?</li>
  <li>Is this a bug with the iOS SDK?</li>
  </ol>
  
  <p>First off, here are two screenshots which illustrate my problem.</p>
  
  <ol>
  <li>Press the button shown in the <em>1st screenshot</em>.</li>
  <li>Wait for iAd to load.</li>
  <li>Click the iAd.</li>
  <li>Dismiss the iAd by pressing the black X in the upper-left corner of the full-screen iAd.</li>
  <li>Notice that the iAd moves to the top (<em>2nd screenshot</em>)</li>
  </ol>
  
  <h2>Press the button shown and wait for an iAd to load</h2>
  
  <p><img src="https://i.stack.imgur.com/CDQHc.png" alt="Ad loaded"></p>
  
  <h2>Press/Click the iAd banner to view the ad fullscreen</h2>
  
  <p><img src="https://i.stack.imgur.com/VtME0.png" alt="press/click iAd banner"></p>
  
  <h2>Dismiss the fullscreen iAd and notice iOS SDK moved the iAD banner to the top of its superview</h2>
  
  <p><img src="https://i.stack.imgur.com/hzPTu.png" alt="bug illustration"></p>
  
  <p>By hitting breakpoints and such, I noticed that <code>[UIViewControllerWrapper setFrame:]</code> is responsible for relocating the AdBannerView, but that is completely out of my control, as it is part of Apple's frameworks.</p>
  
  <p>The only way for me to work around this issue is to correct the location of the AdBannerView by overriding <code>viewWillLayoutSubviews</code> in whichever view controller is responsible for properly placing the AdBannerView.  </p>
  
  <p>But even this workaround produces a jumpy relocation of the AdBannerView from the top of its superview to the correct location (underneath the tableview, above the tab bar, contained in the table view's superview).</p>
  
  <p>A good answer will be one that posts sample code illustrating how to defeat this nagging issue.</p>
  
  <p><a href="https://devforums.apple.com/thread/184889" rel="nofollow noreferrer">I have started a thread on Apple's Developer Forums</a>, as well.  So feel free to consult this thread.</p>