KKAppDelegate Class Reference
| Inherits from | NSObject |
| Conforms to | CCDirectorDelegate UIApplicationDelegate |
| Declared in | KKAppDelegate.h |
Tasks
-
windowThe App’s UIWindow object.
property -
rootViewControllerGives you access to the root view controller object (since cocos2d 2.0 that’s CCDirectorIOS)
property -
navControllerReturns the navication controller
property -
configGives you access to the startup properties defined in startup-config.lua
property -
directorreturns the iOS director which double acts as root view controller
property -
– tryToRunFirstScene -
glViewThe MacGLView
property -
– toggleFullScreen:Call this to enter or leave fullscreen mode.
-
– initializationCompleteCalled when Cocos2D is initialized and the App is ready to run the first scene. You should override this method in your AppDelegate implementation.
-
– alternateViewCalled before the (root ViewController’s) view is initialized. Override and return a UIView to use a different view for the root ViewController instead of the Director’s glView. If you use an alternate view, you are responsible for adding the glView somewhere to the view hierarchy. Primarily used for integration with UIKit/AppKit views to change the view hierarchy from: window –> glView to window –> overarching view –> subviews (glView plus n UIKit/AppKit views).
Properties
config
Gives you access to the startup properties defined in startup-config.lua
@property (nonatomic, readonly) KKStartupConfig *configDeclared In
KKAppDelegate.hdirector
returns the iOS director which double acts as root view controller
@property (unsafe_unretained, readonly) CCDirectorIOS *directorDeclared In
KKAppDelegate.hnavController
Returns the navication controller
@property (nonatomic, readonly) KKNavigationController *navControllerDeclared In
KKAppDelegate.hInstance Methods
alternateView
Called before the (root ViewController’s) view is initialized. Override and return a UIView to use a different view for the root ViewController instead of the Director’s glView. If you use an alternate view, you are responsible for adding the glView somewhere to the view hierarchy. Primarily used for integration with UIKit/AppKit views to change the view hierarchy from: window –> glView to window –> overarching view –> subviews (glView plus n UIKit/AppKit views).
- (id)alternateViewDeclared In
KKAppDelegate.hinitializationComplete
Called when Cocos2D is initialized and the App is ready to run the first scene. You should override this method in your AppDelegate implementation.
- (void)initializationCompleteDeclared In
KKAppDelegate.h