title: Displaying iAd Banner above Tab Bar in Swift
body: <p>So I have implemented iAd into my app, imported the framework and imported it into my View Controller and added the delegate and all that. I do see it when I run my app, however, I have a tab bar (I am not using a tab bar controller if that matters) and I want to have the iAd above the tab bar, as currently I am getting it below the tab bar and feel this isn't good for the user experience, and also on Apple's documentation is mentions to put it directly above a tab bar (<a href="https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/iAdRichMediaAds.html" rel="nofollow">https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/iAdRichMediaAds.html</a>). I have been playing around with it, but haven't gotten anything to work, and was wondering if anyone had any suggestions on my code posted below. Thanks.</p>
  
  <pre><code> var bannerView: ADBannerView!
   @IBOutlet weak var tabBar: UITabBar!
  
  override func viewDidLoad() {
          super.viewDidLoad()
  
          self.canDisplayBannerAds = true
          bannerView = ADBannerView(frame: CGRectZero)
          bannerView.frame = CGRectMake(0, self.view.frame.size.height - self.tabBar.frame.size.height - bannerView.frame.size.height, self.view.frame.size.width, bannerView.frame.size.height)
          bannerView.alpha = 0.0
          bannerView.delegate = self
          self.view!.addSubview(bannerView)
  
      func bannerViewDidLoadAd(banner: ADBannerView!) {
          print("bannerViewDidLoadAd")
          bannerView.hidden = false
      }
  
      func bannerView(banner: ADBannerView, didFailToReceiveAdWithError error: NSError) {
          UIView.animateWithDuration(0.5, animations: {banner.alpha = 1.0})
          UIView.commitAnimations()
          bannerView.hidden = true
      }
  
      func bannerViewActionShouldBegin(banner: ADBannerView!, willLeaveApplication willLeave: Bool) -&gt; Bool {
          return true
      }
  </code></pre>