GADBannerView reload GADRequest twice when showing or hiding Navigation bar programmatically

270 views
Skip to first unread message

Tony Huynh

unread,
May 25, 2016, 12:05:29 AM5/25/16
to Google Mobile Ads SDK Developers
I am using Admob SDK to display banner view GADBannerView on iOS.
However, when I show or hide Navigation bar on the top of ViewController, GADBannerView automatically hide the banner and reload another GADRequest which cause adViewDidReceiveAd twice, then display the banner again.
I suggest its no need to reload request when showing or hiding Navigation bar programmatically.
Is there anyone here to face with that problem?

Tony Huynh

unread,
May 25, 2016, 12:09:58 AM5/25/16
to Google Mobile Ads SDK Developers
Here is my environment:
  • iOS Mobile Ads SDK version 7.8.1
  • iOS 8.3 on iPhone 6 plus

Veer Arjun Busani(Mobile Ads SDK Team)

unread,
May 25, 2016, 12:12:41 PM5/25/16
to Google Mobile Ads SDK Developers
Hi Tony,

Would you mind confirming the same with this modified sample app? In that sample I'm pushing the ViewController through a NavigationController and I was unable to reproduce the issue. Do let us know if you need anything else. 

Thanks,
Veer Busani
Mobile Ads SDK Team

Tony Huynh

unread,
May 25, 2016, 8:52:59 PM5/25/16
to Google Mobile Ads SDK Developers
Hi Veer,

Very thanks for your consideration. I have checked my code and notice that the problem occurs when I set as below:
        bannerView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleTopMargin;

The problem was solved when I only set bannerView.autoresizingMask = UIViewAutoresizingFlexibleTopMargin;
I also notice that when I dont set autoresizingMask, the bannerView scrolling down to disappear when showing navigationBar.

However, thanks for your help.
Tony
Reply all
Reply to author
Forward
0 new messages