こんにちは私はスクリーンショットを撮るためにこのコードを使用しています
+(CCRenderTexture *)screenshotWithStartNode:(CCSprite )startNode filename:(NSString)filename {[CCDirector sharedDirector] .nextDeltaTimeZero = YES;
CGSize winSize = CGSizeMake(startNode.contentSizeInPixels.width, startNode.contentSizeInPixels.height);
CGSize photoSize =CGSizeMake(startNode.contentSize.width, winSize.height * startNode.scaleX);
CCRenderTexture* rtx =[CCRenderTexture renderTextureWithWidth:startNode.contentSizeInPixels.width height:startNode.contentSizeInPixels.height];
[rtx begin];
[startNode訪問]; [rtx終了];
// save as file as PNG
[rtx saveBuffer:[self screenshotPathForFile:filename]
format:kCCImageFormatPNG];
return rtx;
}