1. Set up the banner ad delegate method
[Yodo1Mas sharedInstance].bannerAdDelegate = self;
#pragma mark - Yodo1MasAdDelegate
- (void)onAdOpened:(Yodo1MasAdEvent *)event {
}
- (void)onAdClosed:(Yodo1MasAdEvent *)event {
}
- (void)onAdvertError:(Yodo1MasAdEvent *)event error:(Yodo1MasError *)error {
}
2. Check the loading status of banners
BOOL isLoaded = [[Yodo1Mas sharedInstance] isBannerAdLoaded];
3. Show banner ad
Use the show method to display a banner.
[[Yodo1Mas sharedInstance] showBannerAd];
The method uses default aligment parameters Yodo1MasAdBannerAlignTop | Yodo1MasAdBannerAlignHorizontalCenter
and a default offset of (X: 0,Y: 0).
Yodo1MasAdBannerAlign align = Yodo1MasAdBannerAlignTop | Yodo1MasAdBannerAlignHorizontalCenter;
[[Yodo1Mas sharedInstance] showBannerAdWithAlign:align];
You can customize the banner alignment and offset.
Yodo1MasAdBannerAlign align = Yodo1MasAdBannerAlignTop | Yodo1MasAdBannerAlignHorizontalCenter;
CGPoint point = CGPointMake(10.0f, 10.0f);
[[Yodo1Mas sharedInstance] showBannerAdWithAlign:align offset:point];
4. Dismiss banner ad
[[Yodo1Mas sharedInstance] dismissBannerAd];
Comments
0 comments
Please sign in to leave a comment.