我想以编程方式抓取屏幕截图。所以我写它的代码就像,在iPhone中捕捉屏幕截图?
CGContextRef context = [self createBitmapContextOfSize:self.frame.size];
//not sure why this is necessary...image renders upside-down and mirrored
CGAffineTransform flipVertical = CGAffineTransformMake(1, 0, 0, -1, 0, self.frame.size.height);
CGContextConcatCTM(context, flipVertical);
[self.layer renderInContext:context];
CGImageRef cgImage = CGBitmapContextCreateImage(context);
UIImage* background = [UIImage imageWithCGImage: cgImage];
CGImageRelease(cgImage);
self.currentScreen = background;
这里所有的代码是在UIViewController的自定义UIView。现在,当我在UIView上播放UIImageView png序列动画时,我没有在UIImageView的自定义UIView的子视图中更新更改,为什么?我得到的唯一结果是UIImageView与第一个UIImage。
基本上我需要创建一个我的游戏玩像一个谈话汤姆应用程序的视频。
对不起朋友我已经按照这段代码,但它不适合我....它给了我同样的结果。 :(upsate – Tirth 2012-01-30 07:13:53
hello RRB:此代码正在工作到我的应用程序捕捉iPhone的截图 – 2012-01-30 07:16:10
我可以给演示的 – 2012-01-30 07:16:58