我已经成功集成了Chartboost奖励视频,它可以工作,但我希望实现在用户完全观看奖励视频时将增加积分的代码。我试图在应用程序委托中实现,它调用它,但由于一些内部函数,我需要在特定的视图控制器中实现。所以,当我把相同的代码与Chartboost集成objective-c
-(void)didCompleteRewardedVideo:(CBLocation)location
withReward:(int)reward {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Really reset?" message:@"hi ?" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:nil];
// optional - add more buttons:
[alert addButtonWithTitle:@"Yes"];
[alert show];
}
如果我实现特定视图控制器代替的appdelegate这个代码警报视图将不会出现。我认为它没有在视图控制器中调用,因为它没有响应。我需要帮助来实现视图控制器
使用uialertcontroller而不是uialertview。你需要显示你在哪里调用上述方法 –