RevMob check Banner is loaded or not in iPhone?

霸气de小男生 提交于 2019-12-13 05:27:25

问题


I am using Revmob Framework for displaying ad banners and it's working fine.

So now my Question is that how to know programmatically that banner is loaded or not?

Like if we are using iads then there is a method "isBannerLoaded" to check banner is loaded or not.

Actually I want to set it's frame as banner is loaded or not loaded.

So is there any method like "isBannerLoaded" in Revmob Framework?


回答1:


You need to implement the revMobDelegate and use revmobAdDidReceive:

@interface MyAdClass : NSObject <RevMobAdsDelegate>
...

@implementation MyAdClass
-(void) prepare {
    ...
    ad = [[[RevMobAds session] bannerView] retain];
    ad.delegate = self;
    [ad loadAd];
    ...
} 

- (void)revmobAdDidReceive {
    NSLog(@"ad received");
    ...
}

You can find RevMobAdsDelegate documentation at http://sdk.revmob.com/ios-api/Protocols/RevMobAdsDelegate.html



来源:https://stackoverflow.com/questions/14452416/revmob-check-banner-is-loaded-or-not-in-iphone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!