我在我的应用程序底部显示添加,但在 iOS 7 中,添加从底部显示,但在 iOS 6 中,添加显示在底部。
-(void)showAdds
{
[bannerView removeFromSuperview];
if ((UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad))
{
// bannerView = [[GADBannerView alloc] initWithAdSize:kGADAdSizeBanner];
bannerView = [[GADBannerView alloc]
initWithFrame:CGRectMake(128.0,
670 ,
GAD_SIZE_728x90.width,
GAD_SIZE_728x90.height)];
bannerView.adUnitID = @"********";
}
else {
// Create a view of the standard size at the bottom of the screen.
// bannerView = [[GADBannerView alloc] initWithAdSize:kGADAdSizeBanner];
bannerView = [[GADBannerView alloc]
initWithFrame:CGRectMake(80,
250,
GAD_SIZE_320x50.width,
GAD_SIZE_320x50.height)];
bannerView.adUnitID = @"*******";
NSLog(@"ads");
}
bannerView.rootViewController = self;
[self.view addSubview:bannerView];
// Initiate a generic request to load it with an ad.
[bannerView loadRequest:[GADRequest request]];
}