Apple の要求に従って、広告がロードされていないときに iAd を画面外にしようとしています。彼らは私にこのコードを与えました:
- (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 bannerIsVisible を追加しようとしましたが、状況が悪化しました