0

我目前正在我的 iOS 应用中实施 LeadBolt 插页式广告。但是,在这一行的末尾:

[[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleModuleFail) name:@"onModuleFailed" object:@"AppFireworksNotification"]];

我收到“预期标识符”错误。请告知如何解决此问题。

-(void)loadDisplayAd
{
   LeadboltOverlay *interstitial = [LeadboltOverlay createAdWithSectionid:@"YOUR_LB_INTERSTITIAL_ID" view:self.view];
   [interstitial loadAd];
}


- (void)viewDidLoad {

    LeadboltOverlay *audioad = [LeadboltOverlay createAdWithSectionid:@"YOUR_LB_AUDIO_ID" view:self.view];
    [audioad loadAudioAd];
    // [AppTracker setLandscapeMode:YES]; // Un-comment for Landscape mode
    [[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleModuleFail) name:@"onModuleFailed" object:@"AppFireworksNotification"]];
    [AppTracker startSession:@"APPFIREWORKS_API_KEY" view:self.view];


    [self loadDisplayAd];
4

1 回答 1

0

你有一组额外的括号。替换这个:

[[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleModuleFail) name:@"onModuleFailed" object:@"AppFireworksNotification"]];

有了这个:

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleModuleFail) name:@"onModuleFailed" object:@"AppFireworksNotification"];
于 2014-08-27T18:19:37.057 回答