Re: [IOS - admob sdk 6.1.5 ] clicked banners show a scroll window at the wrong place

105 views
Skip to first unread message

Eric Leichtenschlag

unread,
Aug 20, 2012, 3:21:37 PM8/20/12
to google-adm...@googlegroups.com
Hey FC,

If you're setting the frame to use kGADAdSizeBanner height and width, why not init with the kGADAdSizeBanner Ad Size?

Eric


On Fri, Aug 17, 2012 at 2:58 AM, Fishing Cactus <adb...@gmail.com> wrote:
Hi there we started using admob a few days ago and everything seemed to go fine
until we clicked on a banner, the window appeared outside of the screen a scrolled partially into the screen

I'm using kGADAdSizeSmartBannerLandscape to display the ad at the top right corner of my application (which is in landscape)
it works fine for some ad systems (like iAd) and for some reason other ads have that wrong behavior :



I'm doing something like this in my code :

Banner = [[GADBannerView alloc] initWithAdSize: kGADAdSizeSmartBannerLandscape];
Banner.frame = CGRectMake(480.0f - kGADAdSizeBanner.size.width, 0.0f, kGADAdSizeBanner.size.width, kGADAdSizeBanner.size.height);
Banner.adUnitID = @"xxxxxxxxxxxxxx"; // ad unit is correctly set in my code
[Banner setRootViewController:self];
[Banner setDelegate:self];
[self.view addSubview:Banner];
[Banner loadRequest:[GADRequest request]];

the second line is to limit the banner size ( otherwise it would overlap some part of my game HUD)

Thanks in advance,

FC

--
 
 
  


Eric Leichtenschlag

unread,
Aug 21, 2012, 1:57:21 PM8/21/12
to google-adm...@googlegroups.com
Hey FC,

kGADSizeBanner is a 320x50 ad that works in both portrait and landscape.  On landscape though, the 320 width doesn't take up the full screen.

This is the motivation for the kGADSizeSmartBanner{Portrait|Landscape} constants.  These constants take up the full width of the screen.  So kGADSizeSmartBannerLandscape would be 480x32 on phones, and this constant should only be used on landscape. kGADSizeSmartBannerPortrait will be 320x50 on portrait on phones, but should only be used for portrait.  On tablets, kGADSizeSmartBannerPortrait should be 768x90 in portrait, and kGADSizeSmartBannerLandscape should be 1024x90 in landscape.

I'm not sure if you're trying to hack together a 320x32, but we don't support that format.  In landscape, I'd recommend the 480x32 smart banner, or just the 320x50 regular banner, depending on what fits your needs.

Cheers,
Eric 


On Tue, Aug 21, 2012 at 12:57 AM, Fishing Cactus <adb...@gmail.com> wrote:
Hi Eric
thanks for your feedback

I admit I don't quite understand the whole point of having predefined banner sizes for specific device orientation
but the fact is it is specified in the banner size documentation that kGADAdSizeBanner would only work in portrait mode

And we need this specific size to work in landscape our UI design was made with this banner size

So I chose to ask for a landscape banner to force it to a kGADAdSizeBanner.

I know it sounds wrong but requesting a kGADAdSizeBanner ad does not solve my problem either...

FC
--
 
 
  


Reply all
Reply to author
Forward
0 new messages