// Create a view of the standard size at the top of the screen.
// Available AdSize constants are explained in GADAdSize.h.
self.bannerView = [[GADBannerView alloc] initWithAdSize:kGADAdSizeBanner origin:CGPointMake(self.view.bounds.size.height-kGADAdSizeBanner.size.height, self.view.bounds.size.width-kGADAdSizeBanner.size.width)];
NSLog(@"meu banner %@",self.bannerView);
// Specify the ad unit ID.
self.bannerView.adUnitID= MY_BANNER_UNIT_ID;
// Let the runtime know which UIViewController to restore after taking
// the user wherever the ad goes and add it to the view hierarchy.
self.bannerView.rootViewController = self;
[self.view addSubview:self.bannerView];
// Make the request for a test ad. Put in an identifier for
// the simulator as well as any devices you want to receive test ads.
GADRequest *myRequest = [GADRequest request];
// Make the request for a test ad. Put in an identifier for
// the simulator as well as any devices you want to receive test ads.
myRequest.testDevices = [NSArray arrayWithObjects:
GAD_SIMULATOR_ID,
@"e76321d9683a7ca3d5a8aad71b9f386f",
nil];
// Initiate a generic request to load it with an ad.
[self.bannerView loadRequest:myRequest];
--
---
You received this message because you are subscribed to the Google Groups "Google AdMob Ads Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.