gpt4 book ai didi

ios - 为什么这个 iAd 没有正常消失?

转载 作者:搜寻专家 更新时间:2023-10-30 20:18:02 25 4
gpt4 key购买 nike

// iAd Advertising
#pragma mark iAd Delegate Methods

- (void) bannerViewDidLoadAd:(ADBannerView *)banner {
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:1];
[banner setAlpha:1];
[UIView commitAnimations];

} // if there is an internet connection, load the iAd with a 1 second fade in effect

- (void) bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error {
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:1];
[banner setAlpha:0];
[UIView commitAnimations];
}

setAlpha0 时,它不应该消失,而不是在屏幕上显示一条白线来替代不存在的广告吗?

我希望横幅完全消失,但它显示的是白色横幅。我以前使用过这种类型的动画并且没有问题让事情完全消失。是因为它是 iAd 横幅吗?

最佳答案

在 iAd 的 Storyboard中将 alpha 设置为 0。然后它将使用您提供的代码。

关于ios - 为什么这个 iAd 没有正常消失?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22184479/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com