Вопрос

I have a banner at the bottom of my modal, and I need to adjust the size of my image accordingly in viewDidLoad method. if the ad is loaded, I need to scale my image down. otherwise I scale it up. The _bannerView is setup 3 seconds before presenting the view. when viewDidLoad. if the ad has not been loaded, I will not display the banner at all for that view.

I don't want to modify the size after viewDidLoad. i.e. I don't want to use admob's delegate method and adjust the size AFTER viewDidLoad.

I have checked GADBannerView but I didn't find any property or method to check. please help

Это было полезно?

Решение

you could implement this delegate function somewhere:

(maybe on the view before the view in question, just make sure to set the delegate to the right view)

- (void)adViewDidReceiveAd:(GADBannerView *)bannerView{
    myGlobalBooleanThatSaysIfTheAdLoaded = YES;
}

then check myGlobalBooleanThatSaysIfTheAdLoaded before viewDidLoad.

Does that solve your problem?

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top