I have an iAd banner working in a Cocos2d app.
Here\'s the code for a CCLayer subclass I made to show ads. On DidLoad, the add becomes visible and the bottom menu sl
Cocos2d_2.0_iAd_Sample
Cocos2d_3.0_iAd_Sample
In your scene do this.
-(void)onEnter
{
[super onEnter];
mIAd = [[MyiAd alloc] init];
}
-(void)play
{
[self hideAdsBanner];
}
-(void)hideAdsBanner
{
if(mIAd)
[mIAd RemoveiAd ];
}
-(void)onExit
{
if(mIAd)
{
[mIAd release];
mIAd = nil;
}
[super onExit];
}