0

I am using iAd in one of my iphone app's and sometimes when it cant load it goes off screen and this is the code im using:

-(void)bannerView:(ADBannerView *)aBanner didFailToReceiveAdWithError:(NSError *)error {
if (!self.bannerIsVisible) {
    [UIView beginAnimations:@"animatedAdBannerOff" context:NULL];
    banner.frame = CGRectOffset(banner.frame, 0.0, -320.0);
    [UIView commitAnimations];
    self.bannerIsVisible = NO;
}

The thing is when it doesent load there is just a white space, how would I write like a label error ad could not load, or something like that??? thanks

user1483652
  • 799
  • 1
  • 9
  • 16
  • What do you mean when it doesn't load there is just a white space? If it loads correctly, you should animate it to show on the screen. If it doesn't load, you shouldn't do any animations and just let it stay hidden. Why would there be white space? – MikeS Aug 02 '12 at 13:59

1 Answers1

2

Use a UIAlertView:

UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error" message:@"Could not display iAd" delegate:nil cancelButtonTitle:@"Dismiss" otherButtonTitles:nil, nil];

        [alert show];
Imirak
  • 1,323
  • 11
  • 21