iOS: Status bar getting hidden (going blank white) on ad click

1,485 views
Skip to first unread message

akdsouza

unread,
May 18, 2012, 3:47:34 AM5/18/12
to google-adm...@googlegroups.com
In a navigation based app having a uitableview, im showing an admob bannerview inside the tablecell. When the ad is clicked, the admob delegate opens a modalview which occupies the entire screen (including status bar area) but just as the modal view appears, the space where the status bar is shown turns white as if its being hidden. On dismissing the modal the status bar is shown again... I dont know why this occurs, has anyone encountered the 20px status bar going blank in a similar way? Not sure if this is an admob sdk bug.

Rajkumar Parameswaran

unread,
May 23, 2012, 12:17:46 AM5/23/12
to google-adm...@googlegroups.com
Don't think I've seen this before. I've done some examples showing ads in a tableview but don't think I ever saw the status bar going blank. Can you show us some code that shows how you're setting your rootViewController and placing the ad into the tableview?

Kepboy

unread,
May 23, 2012, 12:40:31 AM5/23/12
to Google AdMob Ads Developers
I observed this behaviour when using AdMob with AdWhirl. Basically,
AdWhirl sets the adMob.rootViewController when requesting the advert,
unfortunately the user would then display a different modal view
controller (by touching an icon in my app) and the advert would be
displayed in this new controller. Then when you click on the advert
it, I'm guessing, attempts to display a modal view from the original
root, which is behind my current modal view controller.

The solution, for me was to alter the AdWhirl code and set the
adMob.rootViewController once the advert had been retrieved.

If you're not using adWhirl maybe you just need to update the
adMob.rootViewController whenever you preset a modal view controller.

On May 23, 2:17 pm, Rajkumar Parameswaran <rajp...@google.com> wrote:
> Don't think I've seen this before. I've done some
> examples<http://googleadsdeveloper.blogspot.com/2012/03/embedding-google-admob...>showing

akdsouza

unread,
May 23, 2012, 11:54:08 PM5/23/12
to Google AdMob Ads Developers
No, im not using admobs with adwhirl, its standalone.

I have a generic function that returns an adview (since i need to
display ad's in several screens).
Here's the code:
- (GADBannerView *)createAdViewController:(UIViewController *)viewCtrl
{

GADBannerView *adMobView = [[GADBannerView alloc]
initWithFrame:CGRectMake(0,0, GAD_SIZE_320x50.width,
GAD_SIZE_320x50.height)];

adMobView.adUnitID = <ad mob publisher id>;
adMobView.rootViewController = viewCtrl;
adMobView.delegate = self;

return [adMobView autorelease];
}

and another function that's called in the cellForRowAtIndexPath
delegate to load the advertisement for the GADBannerView adview
parameter:

- (void)loadAdvertisement:(GADBannerView *)adView{

GADRequest *request = [GADRequest request];
request.testing = YES;
[adView loadRequest:request];

akdsouza

unread,
May 24, 2012, 1:13:35 AM5/24/12
to Google AdMob Ads Developers
I've created a sample project with minimal code to show an ad in a
tableview just like im doing in the application with the status bar
issue.
You can download the sample project here:
https://sites.google.com/site/iosadmobs/iosadmobtestproject/ADTest.zip?attredirects=0&d=1

Just add your publisher id in #define PUBLISHER_ID @"<publisher id
here>" and run the code.
I see the exact same status bar blanking issue here as well... what am
i doing wrong?? :(

akdsouza

unread,
May 29, 2012, 2:41:48 AM5/29/12
to Google AdMob Ads Developers
any luck yet with my sample project??

On May 23, 9:17 am, Rajkumar Parameswaran <rajp...@google.com> wrote:
> Don't think I've seen this before. I've done some
> examples<http://googleadsdeveloper.blogspot.com/2012/03/embedding-google-admob...>showing

Rajkumar Parameswaran

unread,
Jun 1, 2012, 2:57:11 PM6/1/12
to google-adm...@googlegroups.com
Hey,

Thanks a lot for the sample project. I think what you're seeing there is expected behavior though. The status bar is hidden momentarily when displaying the full screen view so that the modal view covers the entire screen. The status bar should be shown again when you come back out of the ad correctly as well.

Raj

Kepboy

unread,
May 31, 2012, 7:45:17 PM5/31/12
to Google AdMob Ads Developers
Had a look, only thing I can suggest is that the window
backgroundColor is white or your view controller's view background
color is white.

akdsouza

unread,
Jun 4, 2012, 11:15:58 PM6/4/12
to Google AdMob Ads Developers
Irrespective of that, the status bar getting hidden jst seconds before
the modal view appears is not at all pleasant to the eye :( , but as
Rajkumar points above, i guess i'll have to live with it. I hope this
disappearing act of the status bar is addressed in future versions of
the sdk.
Reply all
Reply to author
Forward
0 new messages