1

I am trying to implement AdWhirl in my cocos2d app (2.1 version), but al tutorials are using "RootViewController.h". Was it removed from 2.x versions? What should I use instead of it? This tutorial for example http://emeene.com/2010/10/adwhirl-cocos2d-iphone/

Mathemage
  • 315
  • 4
  • 13

1 Answers1

1

You might want to check out the blog post here on how to integrate AdMob with Cocos2D v2.0. It should be minor tweaks needed to get it up and going for AdWhirl.

Specifically, I think they've started using a navigation controller as their root controller in that version of Cocos2D. This shouldn't affect you too much though. As far as AdWhirl is concerned, you should be able to add your adView as:

[[CCDirector sharedDirector].view addSubview:adBanner_];

And for the viewControllerForPresentingModalView: method you can probably use:

- (UIViewController *)viewControllerForPresentingModalView {
    AppController *app = (AppController*) [[UIApplication sharedApplication] delegate];
    return [app navController];
}
RajPara
  • 2,281
  • 1
  • 16
  • 9