当我的应用程序加载时,它会在整个会话中显示相同的横幅广告。有没有一种方法可以在新广告中循环使用,例如刷新当前横幅以显示下一个广告?这正在扼杀我的印象和转换。正如一则广告所示,整个会话并不会真正吸引用户太多。我知道通过阅读 loadAd() 与它有关的文档,但我似乎无法弄清楚如何实际实现该时间间隔。这是我的代码,用于在我显示横幅的视图中使用leadbolt 现在发生的事情。这是 - (void)viewDidLoad 的一部分,我只是省略了与广告无关的所有其他内容。
overlay = [[UIWebView alloc] initWithFrame:CGRectZero];
titleBar = [[UIToolbar alloc] initWithFrame:CGRectZero];
footerBar = [[UIToolbar alloc] initWithFrame:CGRectZero];
clickTitleBar = [[UIToolbar alloc] initWithFrame:CGRectZero];
clickFooterBar = [[UIToolbar alloc] initWithFrame:CGRectZero];
mask = [[UIView alloc] initWithFrame:CGRectZero];
[self.view insertSubview:mask atIndex:2];
[self.view insertSubview:clickTitleBar atIndex:3];
[self.view insertSubview:clickFooterBar atIndex:4];
[self.view insertSubview:titleBar atIndex:5];
[self.view insertSubview:footerBar atIndex:6];
[self.view insertSubview:overlay atIndex:7];
overlay.delegate = overlayController;
//initialize the overlayController
overlayController = [[LeadboltOverlay alloc] init];
[overlayController setSectionid:@"MY AD #"];
[overlayController setAdWebView:self.overlay];
[overlayController setCloseBar:self.titleBar];
[overlayController setFooterBar:self.footerBar];
[overlayController setClickCloseBar:self.clickTitleBar];
[overlayController setClickFooterBar:self.clickFooterBar];
[overlayController setLocationControl:@"0"];
[overlayController setMask:self.mask];
///////This part here?///////
[overlayController loadAd];
/////////////////////////////
overlay.delegate = overlayController;
self.stsTimer = [NSTimer timerWithTimeInterval:3.0 target:self selector:@selector(checkCompleted) userInfo:nil repeats:YES];
[[NSRunLoop currentRunLoop] addTimer:self.stsTimer forMode:NSDefaultRunLoopMode];