这是我的Cocos2d 2.0调用。在Cocos2d 3.0中有什么替代方案
AppController *app = (AppController*) [[UIApplication sharedApplication] delegate];
[[app navController] presentModalViewController:achivementViewController animated:YES];
答案 0 :(得分:1)
在Cocos2d 3.0中,使用CCAppDelegate而不是AppController:
CCAppDelegate *app = (CCAppDelegate*) [[UIApplication sharedApplication] delegate];
[[app navController] presentModalViewController:achivementViewController animated:YES];
答案 1 :(得分:0)
AppController再次重命名为AppDelegate:
#import "AppDelegate.h"
AppDelegate * app = (((AppDelegate*) [UIApplication sharedApplication].delegate));
[[app navController] presentModalViewController:achivementViewController animated:YES];