0

I am creating an iOS8+ application and am ready to add iAd to it. At this time, I've set the following in viewDidLoad() for each UIViewController in my application:

self.canDisplayBannerAds = true

Everything seems to be working properly... Ads are appearing when I switch between views. Is this the proper way to enable iAd with multiple views on iOS8 and newer releases?

I have not found any documentation that says how to use canDisplayBannerAds with multiple view controllers. I found a lot of postings for earlier releases of iOS where the developer had to implement iAd on his/her own, and only create a singleton. Anyway, I hope that someone can verify that what I have done is correct and will work properly when the app goes to the store.

Thank you for your time and help,

Mike

rmaddy
  • 314,917
  • 42
  • 532
  • 579
A Bit of Help
  • 1,368
  • 19
  • 36
  • 2
    `Yes, this is perfectly fine even for iOS 7. The documentation is [here](https://developer.apple.com/library/ios/documentation/iAd/Reference/UIViewController_iAd_Additions/#//apple_ref/occ/instp/UIViewController/canDisplayBannerAds). – Adam Oct 06 '15 at 14:41
  • Hi Adam, thanks for the quick response and verification! So, I will use this method rather than dealing with managing the banner myself. :) – A Bit of Help Oct 06 '15 at 16:08

0 Answers0