2

I am implementing Flurry ads into my app, and I've come across an issue that I've gotten stumped on.

The integration of a banner ad is as follows:

[FlurryAds setAdDelegate:self];

[FlurryAds fetchAndDisplayAdForSpace:@"BANNER_MAIN_VIEW" view:self.view size:BANNER_BOTTOM];

The part that I can't figure out is the view parameter. Since cocos2d does not use UIViews, how can I make it work? I've created a view like this UIView *mainView = [[UIView alloc]init]; but I'm not sure how to apply it to a CCScene, since I can't use addChild.

SaleenS7
  • 402
  • 4
  • 15

1 Answers1

4

Did you try (if using cocos2d 3.0):

UIView* view = [CCDirector sharedDirector].view;

[FlurryAds setAdDelegate:self];
[FlurryAds fetchAndDisplayAdForSpace:@"BANNER_MAIN_VIEW" view:view size:BANNER_BOTTOM];
Allen S
  • 1,042
  • 2
  • 9
  • 14