我想问一下在加载广告时如何设置background image
,直到它显示广告。
AdMob = [[GADBannerView alloc]init];
AdMob.frame = CGRectMake(0, 0 , GAD_SIZE_300x250.width, GAD_SIZE_300x250.height);
AdMob.backgroundColor = [UIColor grayColor];
AdMob.adUnitID = [GlobalVariable sharedInstance].PID_IOS_PHONE;
AdMob.rootViewController = self;
GADRequest *request = [GADRequest request];
[AdMob loadRequest:request];
答案 0 :(得分:3)
您可以使用以下代码将图像设置为背景: -
AdMob.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"Background.png"]];