我有一个具有 3 个视图(+ adView)的 viewController。bannerViewDidLoadAd 事件被正确触发,然后我想调整我的视图大小以使 iAd 可见。但是,视图不会调整大小,并且控制台会显示一条消息,告知 iAd 可能被遮挡。然后如何将其置于前面并调整视图大小?谢谢你。
- (void)bannerViewDidLoadAd:(ADBannerView *)banner {
if (!self.bannerIsVisible) { //&& iniciBanner
self.bannerIsVisible = YES;
[self.view addSubview:adView];
[UIView beginAnimations:@"animatedAdBannerOn" context:NULL];
//adView.frame = CGRectOffset(adView.frame, 0, adView.frame.size.height);
[UIView commitAnimations];
self.view.frame = CGRectMake(0, adView.frame.size.height, self.view.frame.size.width, self.view.frame.size.height - adView.frame.size.height);
self.vistaB.frame = CGRectMake(0, adView.frame.size.height, self.vistaB.frame.size.width, self.vistaB.frame.size.height - adView.frame.size.height);
self.vistaSocial.frame = CGRectMake(0, adView.frame.size.height, self.vistaSocial.frame.size.width, self.vistaSocial.frame.size.height - adView.frame.size.height);
[self.view bringSubviewToFront:adView];
}
}