vendredi 30 janvier 2015

AdMob singleton class method import


For iAd i coded my own singleton iAd class however, for AdMob I found a tutorial from Google developers...


http://ift.tt/1wKOjKo


I needed to get the AdMob to work in a different ViewController called ViewControllerTWO.


So I imported #import "GADMasterViewController.h" into ViewControllerTWO and I placed...



- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
shared = [GADMasterViewController singleton];
[shared resetAdView:self];
}


However, i'm receiving 2 errors:


1)No known class method for selector 'singleton'


2)No visible 'GADMasterViewController' declares selector 'resetAdView:'


I don't understand why i'm getting this error when i properly imported AdMob from one VC to another.





Aucun commentaire:

Enregistrer un commentaire