这是我第一次使用RevMob,但它看起来应该足够简单,然而我很难隐藏横幅广告。
- (void)viewDidLoad
{
[super viewDidLoad];
[[RevMobAds session] showBanner];
// Do any additional setup after loading the view.
}
-(IBAction)startGame:(id)sender
{
[[RevMobAds session] hideBanner];
}当视图加载时,横幅在底部,但当我调用函数startGame (通过同一视图中的一个按钮)时,它不会消失,横幅仍然存在。
发布于 2014-07-14 11:19:18
对于任何其他有同样问题的人,我可以用以下方法使其工作:
RevMobBanner* banner;
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
[[RevMobAds session] showBanner];
banner = [[RevMobAds session] banner];
[banner showAd];
}
-(IBAction)startGame:(id)sender
{
[banner hideAd];
}我认为他们可能已经弃用了他们网站上列出的文档(总是很棒),所以希望这能对某些人有所帮助。
https://stackoverflow.com/questions/24728855
复制相似问题