Hi, I’ve added admob in my game.
in AppController.mm, I added following code:
bannerView_ = [[GADBannerView alloc] initWithAdSize:kGADAdSizeSmartBannerPortrait];
CGRect screenRect = [[UIScreen mainScreen] bounds];
CGFloat screenWidth = screenRect.size.width;
CGFloat screenHeight = screenRect.size.height;
[bannerView_ setFrame:CGRectMake(0,
// screenHeight-bannerView_.bounds.size.height,,
0,
bannerView_.bounds.size.width,
bannerView_.bounds.size.height)];
bannerView_.adUnitID = @"myid";
bannerView_.rootViewController = viewController;
[viewController.view addSubview:bannerView_];
[bannerView_ loadRequest:[GADRequest request]];
but this will result in displaying ad all the time.
so, just wondering, how to control of adding admob to different scene?