我正在使用AdMob的中介功能来向我的iPhone应用程序提供iAds和AdMob广告。然而,我从一些AdMob广告中发现了一些非常恼人的东西……
一些AdMob广告直接在我的应用程序中打开网页,在我的导航栏和标签栏之间,并且不能正确显示。它们不像iAds那样是完全模态的,而是侵占了我的应用程序的空间(而且做错了)。
有没有办法挑出这些AdMob广告,只禁用那些试图在应用程序网页中打开的广告?我对打开AppStore或Safari的AdMob广告没什么意见。
下面,你可以看到之前和之后发生的事情。


同样,这很烦人,因为iAds工作得很好,行为符合预期,以模态的方式占据了整个屏幕。另一方面,AdMob对它在我的视图层次结构中的位置做了错误的假设。我可能会重新设计我的层次结构来“让它工作”,但我想,目前的层次结构已经很理想了,任何其他的东西都会感觉像是被黑在一起了。
如果我不能让AdMob正常运作,我的后备计划就是简单地禁用AdMob广告。
发布于 2012-11-08 04:16:16
您是否正确设置了BannerView的rootViewController?
下面是我的一个视图控制器中的viewDidLoad方法的摘录...
- (void)viewDidLoad
{
[super viewDidLoad];
// Create a view of the standard size at the bottom of the screen.
// Available AdSize constants are explained in GADAdSize.h.
_bannerView = [[DFPBannerView alloc] initWithAdSize:kGADAdSizeBanner];
_bannerView.delegate = self;
// Specify the ad's "unit identifier." This is your AdMob Publisher ID.
_bannerView.adUnitID = ADMOB_PUBLISHER_ID;
// Let the runtime know which UIViewController to restore after taking
// the user wherever the ad goes and add it to the view hierarchy.
_bannerView.rootViewController = self;
// SNIP
}https://stackoverflow.com/questions/13276970
复制相似问题