I am looking to implement iAds as UITableViewCells
within my UITableView
but would like to be compliant with the Apple Human Interface Guidelines. I have read the guidelines here and do not see anything explicitly banning this. In addition, apps currently on the App Store (such as the Sports Center app) exhibit this behavior:
I know that there are several Stack Overflow questions on this topic already but the ones I found were several years old and I was wondering if Apple had changed its policy since then.
I am also concerned about being accused of "click-fraud" so if there was any way that I could load the iAd once (possibly in the AppDelegate) and then display it throughout the TableView, that would be ideal.
Any advice on how to implement this, and if it is in fact allowed by Apple would be much appreciated.
I'm not sure the banner you show in the screenshot come from the iAd network. Consider that if you use a different ads provider you are not committed to the exact same rules as for iAd network.
Anyway here a simple way to configure a singleton bannerView. Put in global scope:
let sharedADBannerView: ADBannerView = {
let b = ADBannerView(adType: ADAdType.Banner)
// other configurations if needed
return b
}()
This could go in your app's delegate, but I'd consider to put it in a dedicated file. Probably you'll need to add more logic. And remember that you should not subclass the ADBannerView
class.