Cocos2d iphone Cocos2d 3.0的AppController替代方案

Cocos2d iphone Cocos2d 3.0的AppController替代方案,cocos2d-iphone,Cocos2d Iphone,这是我的Cocos2d 2.0通话。在cocos2d3.0中有什么替代方案 AppController *app = (AppController*) [[UIApplication sharedApplication] delegate]; [[app navController] presentModalViewController:achivementViewController animated:YES]; 在Cocos2d 3.0中,使用CCAppDelegate而

这是我的Cocos2d 2.0通话。在cocos2d3.0中有什么替代方案

    AppController *app = (AppController*) [[UIApplication sharedApplication] delegate];

    [[app navController] presentModalViewController:achivementViewController animated:YES];

在Cocos2d 3.0中,使用CCAppDelegate而不是AppController:

CCAppDelegate *app = (CCAppDelegate*) [[UIApplication sharedApplication] delegate];

[[app navController] presentModalViewController:achivementViewController animated:YES];

AppController再次重命名为AppDelegate:

#import "AppDelegate.h"

AppDelegate * app = (((AppDelegate*) [UIApplication sharedApplication].delegate));

[[app navController] presentModalViewController:achivementViewController animated:YES];