Hello, I have been looking for this solution and somehow I apply these to my last project and worked, this is what I did:
NSString *defaultFile = @"Default.png";
CCSprite *defSprite;
CGImageRef defaultImage = screenshot();
if(defaultImage){
CCLOG(@"Redisplay DefaultImage: Got Default.png image for 'free' by grabbing UI framebuffer contents.");
defSprite = [CCSprite spriteWithCGImage:defaultImage key:defaultFile];
}else{
CCLOG(@"Redisplay DefaultImage: Getting Default.png image from filesystem.");
defSprite = [CCSprite spriteWithFile:defaultFile];
}
//CGImageRelease(defaultImage);
defSprite.anchorPoint = CGPointZero;
CC_ENABLE_DEFAULT_GL_STATES();
[defSprite draw];
CC_DISABLE_DEFAULT_GL_STATES();
[[director openGLView] swapBuffers];
[[CCTextureCache sharedTextureCache] removeTexture:[defSprite texture]];
And iot seems to work, the space of the statusBar wasn't there anymore.. I apply the same on this second project and it does nothing, I have the frame of the statusbar, I see nothing three just an empty black frame.
What can I do?
Thx
Gustavo