简体   繁体   English

无法仅在通用应用程序的iPhone视图上显示iAd

[英]Cannot display iAd on iPhone view only for Universal app

I am trying to display an iAd banner for a Universal app (iPhone/iPad) 我正在尝试为通用应用(iPhone / iPad)显示iAd横幅

The iAd is displayed fine for the iPad, but for the iPhone, I get the message; iAd在iPad上显示正常,但在iPhone上,我收到消息; ADBannerView: WARNING A banner view (0x5743350) has an ad but may be obscured. ADBannerView:警告横幅视图(0x5743350)包含广告,但可能被遮盖。

The code that I use is as follows; 我使用的代码如下:

    ADBannerView *adView = [[ADBannerView alloc] initWithFrame:CGRectZero];
    adView.frame = CGRectMake(0.0, self.view.frame.size.height, adView.frame.size.width, adView.frame.size.height);
    [self.view bringSubviewToFront:adView];

Please help me fix the issue. 请帮助我解决问题。 Also what should the Base SDK be set to such that it works on maximum devices ? 另外,应将Base SDK设置为什么,以使其可在最大设备上使用?

可能是您在CGRectMake中将adview.frame的y坐标设置为self.view.frame的高度,有效地使您成为了原点(0.0,460.0)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM