ios7 - iAd Banner Not Displaying (not showing on storyboards) -
#import "viewcontroller.h" @implementation viewcontroller - (void)viewdidload { [super viewdidload]; self.candisplaybannerads = yes; }
i'm trying place iad banners in ios app no success. stumbled across method , tried (didn't work in simulator) , don't know if enough (adding didfailto....) ads work. couldn't work please me!!!
edit: tells me there no ads available , configuration incorrect. doesn't display test ads :(
i use bannerviewdidloadad
when banner load , show banner animation, need implement <adbannerviewdelegate>
:
#pragma mark - adbannerviewdelegate - (void)bannerviewdidloadad:(adbannerview *)banner { nslog(@"banner loaded"); // display bannerview _iadbannerview.hidden = no; [uiview animatewithduration:0.4f animations:^{ _iadbannerview.alpha = 1.0f; }]; }
and use didfailtoreceiveadwitherror
when banner unload (so here, can add animation move view example) :
- (void)bannerview:(adbannerview *)banner didfailtoreceiveadwitherror:(nserror *)error { // print error nslog(@"error banner failed :\n%@", error); // hide bannerview [uiview animatewithduration:0.4f animations:^{ _iadbannerview.alpha = 0.0f; } completion:^(bool finished) { _iadbannerview.hidden = yes; }]; }
Comments
Post a Comment