Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to animate adds in iphone aap?
    text
    copied!<p>i have a game developed in cocos2d in iphone ..i have getting adds from i ad and admob ... they are shown well in my app at the top ...</p> <p>in my game my game score is shown at the tio .. when ad come its remian there for end of the game till thn game get over.. so i want that ad come and after 1 mint ad goes back with animation so user can see his score ...</p> <p>i am usein g this code for getting adds</p> <p>//////ADD WHIrl Code</p> <h1>pragma mark AdWhirlDelegate methods</h1> <p>/*</p> <ul> <li><p>(NSString *)adWhirlApplicationKey </p> <p>{ //Here you have to enter your AdWhirl SDK key return @"XXXXXXXXXXXXXXXXXXXXXXXXXX"; }</p></li> <li><p>(UIViewController *)viewControllerForPresentingModalView { //Remember that UIViewController we created in the Game.h file? AdMob will use it. //If you want to use "return self;" instead, AdMob will cancel the Ad requests. return viewController; }</p></li> </ul> <p>-(void)adWhirlDidReceiveAd:(AdWhirlView *)adWhirlView { //This is a little trick I'm using... on my game I created a CCMenu with an image to promote //my own paid game so this way I can guarantee that there will always be an Ad on-screen //even if there's no internet connection... it's up to you if you want to implement this or not. //[self removeChild:adBanner cleanup:YES]; }</p> <p>-(void)adWhirlDidFailToReceiveAd:(AdWhirlView *)adWhirlView usingBackup:(BOOL)yesOrNo { //The code to show my own Ad banner again }</p> <p>-(void)onEnter { //Let's allocate the viewController (it will be used for the Ads) viewController = [UIViewController new]; //On our "onExit" method we are hidding the view so it doesn't show Ads in any other //scene but this one... it's needed to enable them [viewController.view setHidden:FALSE]; //This isn't really needed but also it makes no harm. It just retrieves the configuration //from adwhirl.com so it knows what Ad networks to use [adView updateAdWhirlConfig]; //Assign the AdWhirl Delegate to our adView self.adView = [AdWhirlView requestAdWhirlViewWithDelegate:self]; //This is required, even if you don't want to :P self.adView.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin|UIViewAutoresizingFlexibleRightMargin;</p> <pre><code>self.adView.clipsToBounds = YES; //Adding the adView (used for our Ads) to our viewController [viewController.view addSubview:adView]; //Adding that viewController to our main view [[[CCDirector sharedDirector] openGLView] addSubview:viewController.view]; [super onEnter]; </code></pre> <p>}</p> <p>-(void)onExit { //Set adView delegate to nil self.adView.delegate = nil; self.adView = nil; //Remove adView from superView<br> [adView removeFromSuperview]; //Release adView [adView release]; //Hide the viewController so there are no more Ads on screen in any scene but this one [viewController.view setHidden:TRUE]; [super onExit]; } */ /// End Add Whirl</p> <p>thanks in advance Regards Haseeb</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload