방금 내 앱에 ADBannerview를 추가했습니다. UIApplicationDelegate에서 UIApplicationDelegate에 AdBannerView를 만들어 하나의 인스턴스 만 있고 다른 viewController에서 공유합니다.내 AdBannerView를 숨기지 만 여전히 경고를받습니다. 배너보기 (0x9c75550)에 광고가 있습니다.
경고 메시지가 표시되지 않는 한 모든 것이 완벽하게 작동합니다. ADBannerView : 경고 배너보기 (0x9c75550)에 광고가 있습니다. 그러나 가려 질 수 있습니다. 이 메시지는 배너보기별로 한 번만 인쇄됩니다.
(presentModalViewController를 사용하여) 모달보기를 열면 현재 ADBannerview를 표시하는보기의 맨 위에 표시됩니다. 나는이 경고 메시지를 가지고 있지 위해 무엇을 이해하지
- (void)viewWillDisappear:(BOOL)animated
{
ADBannerView *bannerView = [ (ScoreBoardAppDelegate*)[[UIApplication sharedApplication] delegate] adBanner];
[self hideBanner:bannerView];
[super viewWillDisappear:animated];
}
- (void)hideBanner:(ADBannerView*) adBanner {
NSLog(@"%s called", __FUNCTION__);
// Grow the tableview to occupy space left by banner, it's the size of the parent view
CGFloat fullViewHeight = self.tbView.frame.size.height;
CGRect tableFrame = self.tv.frame;
tableFrame.size.height = fullViewHeight;
// Move the banner view offscreen
CGRect bannerFrame = adBanner.frame;
CGRect screenBounds = [[UIScreen mainScreen] bounds];
bannerFrame.origin = CGPointMake(CGRectGetMinX(screenBounds), CGRectGetMaxY(screenBounds));
self.tv.frame = tableFrame;
adBanner.frame = bannerFrame;
}
: 모달보기를 열기 전에 나는 ADBannerview을 숨기려면 다음 코드를 사용하고 있습니다. 모달보기가 표시되기 전에 ADBannerView가 성공적으로 숨겨져있는 것 같습니다 (오프 스크린).
나는 아마 뭔가를 놓쳤지 만 나는 그것을 볼 수 없다. 도움을 주셔서 감사합니다.
세바스찬.
네, 저를 도왔습니다! – sebastien