I created a phonegap application and want to add an Admob banner to it. I have a banner running at the bottom of the screen in the iOS6 simulator, but when I test it on the retina device, the banner will go from the bottom, as if it is still trying to display the screen for non-retina display. Here is my current code in viewDidLoad:
// Initialize the banner at the bottom of the screen. CGPoint origin = CGPointMake(0.0, self.view.frame.size.height - CGSizeFromGADAdSize(kGADAdSizeBanner).height); // Use predefined GADAdSize constants to define the GADBannerView. bannerView_ = [[GADBannerView alloc] initWithAdSize:kGADAdSizeBanner origin:origin]; // Specify the ad "unit identifier." This is your AdMob Publisher ID. bannerView_.adUnitID = @"xxxxxxxxxxxx"; // 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; [self.view addSubview:bannerView_]; // Initiate a generic request to load it with an ad. [bannerView_ loadRequest:[GADRequest request]];
source share