1

Does anyone know how to implement a single iAd banner that sits at the top level of your app so that every view controller that is displayed contains the same instance of the single iAd banner?

I had an implementation a few years ago in Obj-C but cannot find an equivalent in Swift.

Daniel Storm
  • 18,301
  • 9
  • 84
  • 152
Charlie S
  • 4,366
  • 6
  • 59
  • 97
  • 1
    [This](http://stackoverflow.com/a/28639200/2108547) should get you started. Just move the delegate methods to your `AppDelgate.swift`. – Daniel Storm Aug 25 '15 at 13:53
  • Thanks Daniel. Was ideally looking for an iad viewcontroller that I could add as the entrance view to my app - which all other views (including my tabbarcontrollers and navigationcontrollers can then sit inside). Had something like this for objc but cant find anything in swift. – Charlie S Aug 25 '15 at 17:09

1 Answers1

0

As the user above me said what you are looking for is a shared banner ad. You don't need to move the delegates to app delegate.swift, you just need to add the properties there. https://developer.apple.com/library/ios/technotes/tn2286/_index.html

I made an ad helper for swift, why don't you check it out. https://github.com/crashoverride777/Swift-iAds-and-AdMob-Helper

crashoverride777
  • 10,581
  • 2
  • 32
  • 56