GADBannerView only displays ad on swipe up

49 views
Skip to first unread message

Daniel Persson

unread,
Feb 15, 2016, 4:07:07 PM2/15/16
to Google Mobile Ads SDK Developers
Hi!
I've just implemented my first Admob view in an iOS view controller. It's a standard size banner ad at the bottom of the view.

The weird behavior now is that the view shows up empty until i swipe up, then the ad appears. The ad can also get stuck halfway up the view.

This is true for both test ads and production ads.

Is this behavior intended? It leaves a white space at the bottom of the view that looks really ugly. Or can I do something about it?

This is how initialize the banner:

        let request = GADRequest()

        viewBanner.adSize = kGADAdSizeBanner

        viewBanner.adUnitID = AppDelegate.adService.getBannerAdId("PlayGame")

        viewBanner.rootViewController = self

        viewBanner.loadRequest(request)


The getBannerAdId method serves up a proper test or production add id.

Best regards
Daniel

Veer Arjun Busani

unread,
Feb 16, 2016, 11:43:26 AM2/16/16
to Google Mobile Ads SDK Developers
Hi Daniel,

When you mean 'On Swipe up', do you intend to have you an UITableView? And if so, are you loading a Banner View inside of this UITableView? If that is the case I have placed together a sample app for loading Banner Views inside an UITableView. If not you can go through our GitHub for sample apps as this would give you an idea on how to implement Banner Ads on a plain UIViewController.

Thanks,
Veer Arjun Busani
Mobile Ads SDK Team

Daniel Persson

unread,
Feb 16, 2016, 3:01:38 PM2/16/16
to Google Mobile Ads SDK Developers
Hi!
No, the GADBannerView is fixed at the bottom of an ordinary UIViewController with a TableView above it. I've gotten it to work now, but I actually don't know exactly why... The symptom was that the banner was all white, and then when i put my finger on it and swiped up, the banner appeared.

Thx for your suggestions, I will post back here if I can pinpoint the solution.

Best regards
Daniel

Ashish Porecha

unread,
Feb 24, 2016, 1:07:17 PM2/24/16
to Google Mobile Ads SDK Developers
It could be because the ad is loaded in a part of your code that is only triggered when you swipe up. Look at the method where the loading methods are called to see if it is in fact being loaded. Check the BOOL isReady to see if the ad is in fact ready. It may not be loaded until you perform the swipe action, and it might be white because it's loading off the action firing and not pre-loaded when the VC loads or appears. 
Reply all
Reply to author
Forward
0 new messages