i'm working with cocos2d on iPad and i'm using ccviewcontroller class to help integrate UIKit and cocos2d. I've set up a storyboard and have an initial view controller and i'm using this code to set up the CCGLView:
CCGLView *glView = [CCGLView viewWithFrame:[[[UIApplication sharedApplication] keyWindow] bounds]
pixelFormat:kEAGLColorFormatRGB565
depthFormat:0
preserveBackbuffer:NO
sharegroup:nil
multiSampling:NO
numberOfSamples:0];
but for some reason the keyWindow bounds returns 0 and the keyWindow is nil. I'm not sure why this is happening. I have the project using storyboards and have an initial view controller set so i'm kinda stumped. Any help would be great! Thanks!