0

我在我的一个 iphone 应用程序中使用 iAd,有时当它无法加载时它会离开屏幕,这是我使用的代码:

-(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;
}

问题是当它加载时只有一个空格,我怎么会写像标签错误广告无法加载,或者类似的东西???谢谢

4

1 回答 1

2

使用UIAlertView

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

        [alert show];
于 2012-08-02T13:58:51.827 回答