实施iAd标语 [英] Implementing iAd Banner

查看:110
本文介绍了实施iAd标语的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚在App Store上发布了一个带有iAd标语的应用程序.当我下载它检查广告时,即使显示实时:此应用正在接收实时广告",我仍然看到一个纯白色的水平矩形.开发中.

I just published an application on the App Store with an iAd banner. When I downloaded it to check for the advertisement, I just saw a plain white horizontal rectangle even though it says "Live: This app is receiving live ads." in development.

adView = [[ADBannerView alloc] initWithFrame:CGRectZero];
[adView setCurrentContentSizeIdentifier:ADBannerContentSizeIdentifierLandscape];
[adView setDelegate:self];
[self.view addSubview:adView];
[self.view bringSubviewToFront:adView];
    - (BOOL)bannerViewActionShouldBegin:(ADBannerView *)banner willLeaveApplication:(BOOL)willLeave
    {
        return YES;
    }

除了715个请求外,我的性能图表中的所有信息均为零.这是什么意思?

Everything in my performance chart is zero, except for the 715 requests. What does this mean?

此外,iAd是否可以确定用户的位置,以便苹果公司可以投放来自本地公司的广告?例如,用户在日本,iAd会只显示来自日本的广告吗?

Also, is it possible for iAd to determine the user's location so that apple can put ads from local companies? For example, the user is in Japan, will iAd only show ads from Japan?

推荐答案

您需要检查ADBannerView是否收到广告,然后相应地显示或隐藏它.

You need to check if your ADBannerView received an ad or not and then display or hide it accordingly.

-(void)bannerViewDidLoadAd:(ADBannerView *)banner {
        // Display banner
        adView.alpha = 1.0;
}

-(void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error {
        // Hide banner
        adView.alpha = 0.0;
}

这篇关于实施iAd标语的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆