Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 iOS 8 上,使用 using 自动创建的 iAd 横幅canDisplayBannerAd以白色背景显示:这根本不适合应用程序设计。所以我需要改变它。
canDisplayBannerAd
怎么做 ?更改背景颜色属性很容易,但如何访问 iAd 横幅视图?
在iOS7上很好。
好的,我找到了一种方法,方法是在其中创建一个categoryforADBannerView并修改背景颜色属性。
category
ADBannerView
修改是在willMoveToWindow:(UIWindow *)newWindow.
willMoveToWindow:(UIWindow *)newWindow
-(void) willMoveToWindow:(UIWindow *)newWindow { [super willMoveToWindow:newWindow]; self.backgroundColor = [UIColor blackColor]; }