0

根据 Apple 的要求,在未加载广告时尝试让 iAds 离开屏幕。他们给了我这个代码:

- (void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error
{
 if (self.bannerIsVisible)
 {
  [UIView beginAnimations:@"animateAdBannerOff" context:NULL];
   // assumes the banner view is at the top of the screen.
  banner.frame = CGRectOffset(banner.frame, 0, -50);
  [UIView commitAnimations];
  self.bannerIsVisible = NO;
 }
}

我让我的视图成为 iAds 之类的代表,但每当我尝试编译时,我都会得到:

"Request for member 'bannerIsVisible' in something not a structure or union

我尝试添加一个 BOOL 横幅IsVisible,但这只会让事情变得更糟

4

1 回答 1

2

要使用self.bannerIsVisible,您需要bannerIsVisible声明为属性。

于 2010-07-02T01:58:18.817 回答