KKAppDelegate Class Reference
Inherits from | NSObject |
Conforms to | CCDirectorDelegate UIApplicationDelegate |
Declared in | KKAppDelegate.h |
Tasks
-
window
The App’s UIWindow object.
property -
rootViewController
Gives you access to the root view controller object (since cocos2d 2.0 that’s CCDirectorIOS)
property -
navController
Returns the navication controller
property -
config
Gives you access to the startup properties defined in startup-config.lua
property -
director
returns the iOS director which double acts as root view controller
property -
– tryToRunFirstScene
-
glView
The MacGLView
property -
– toggleFullScreen:
Call this to enter or leave fullscreen mode.
-
– initializationComplete
Called when Cocos2D is initialized and the App is ready to run the first scene. You should override this method in your AppDelegate implementation.
-
– 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).
Properties
config
Gives you access to the startup properties defined in startup-config.lua
@property (nonatomic, readonly) KKStartupConfig *config
Declared In
KKAppDelegate.h
director
returns the iOS director which double acts as root view controller
@property (unsafe_unretained, readonly) CCDirectorIOS *director
Declared In
KKAppDelegate.h
navController
Returns the navication controller
@property (nonatomic, readonly) KKNavigationController *navController
Declared In
KKAppDelegate.h
Instance 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)alternateView
Declared In
KKAppDelegate.h
initializationComplete
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)initializationComplete
Declared In
KKAppDelegate.h