我正在尝试将iAd添加到Cordova iPad应用程序的底部。我可以拿到横幅展示,但无法弄清楚如何让它留在底部。
目前,这会在状态栏正下方显示横幅:
- (void)bannerViewDidLoadAd:(ADBannerView *)banner
{
adView.frame = CGRectMake(0.0, 20.0, adView.frame.size.height, adView.frame.size.width);
[adView setHidden:NO];
NSLog(@"show the banner");
}
- (void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error
{
[adView setHidden:YES];
NSLog(@"hide the banner");
}
在viewDidLoad中我有:
- (void)viewDidLoad
{
[super viewDidLoad];
adView.delegate = self;
[adView setAutoresizingMask:UIViewAutoresizingFlexibleWidth];
[adView setHidden:YES];
}