Discoveringmypath
Discoveringmypath

Reputation: 1077

Admob Banner ad, how to implement across multiple view controllers

I'm near completion with an app and I'm starting to add ad's to it. For adMob I have the following code in my viewdidLoad method:

    bannerAd.adUnitID = "...."
    bannerAd.rootViewController = self
    bannerAd.load(GADRequest())

This is currently only on the first view controller that pops up. The ad is on the bottom of a landscape only app. My question is is okay to add this to all of my view Controllers that you can segue too?

I'm not exactly sure if I need to close out the ad when I leave view controllers, or if this is handled automatically. It would be simple for me to add this to all view controllers, but I'm not sure if this creates more ad requests as the user switches from view to view, or how it works...

I'm new to app development and am getting ready to roll out my first app. I would appreciate any help and I thank you in advance!!!!

Upvotes: 4

Views: 1172

Answers (0)

Related Questions