dimanche 1 février 2015

AdMob singleton class method import [on hold]


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:'


The problem appears to be with the line "shared = [GADMasterViewController singleton];"


I don't understand what the problem could be, since the rest of the code seems to be OK, following when i imported AdMob from one VC to another.


Is the syntax of the critical line wrong? Or do I need to add additional code in connection with it to clarify things?





Aucun commentaire:

Enregistrer un commentaire