Я пытаюсь внедрить iAd в одно из моих существующих приложений. Это работает, но я получаю сообщение об ошибке: ADBannerView: ВНИМАНИЕ! В представлении баннера есть реклама, но она может быть скрыта Это сообщение печатается только один раз за просмотр баннера.
Объявление скрыто или может быть скрыто? Что-то не так с кодом? Я не могу понять это. Я признаю, что был новичком. Любая помощь будет принята с благодарностью. Спасибо, что даже посмотрели на мой вопрос.
- (void)createBannerView {
Class cls = NSClassFromString(@"ADBannerView");
if (cls) {
ADBannerView *adView = [[[cls alloc] initWithFrame:CGRectZero]autorelease];
adView.currentContentSizeIdentifier =ADBannerContentSizeIdentifierPortrait;
adView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleTopMargin |UIViewAutoresizingFlexibleBottomMargin| UIViewAutoresizingFlexibleRightMargin |UIViewAutoresizingFlexibleLeftMargin;
adView.delegate = self;
CGRect bannerFrame =adView.frame;
bannerFrame.origin.y = self.view.frame.size.height;
adView.frame = bannerFrame;
adView.frame = CGRectOffset(adView.frame, 0, -50);
self.bannerView = adView;
[self.view addSubview:adView];
}
}
- (void)showBanner {
CGFloat fullViewHeight = self.view.frame.size.height;
CGRect tableFrame = self.tView.frame;
CGRect bannerFrame = self.bannerView.frame;
tableFrame.size.height = fullViewHeight - bannerFrame.size.height;
bannerFrame.origin.y = fullViewHeight - bannerFrame.size.height;
[UIView beginAnimations:@"showBanner" context:NULL];
self.tView.frame = tableFrame;
self.bannerView.frame = bannerFrame;
[UIView commitAnimations];
}