2012-03-01 9 views
5

画像のビデオを作成するためのスクリーンショットをすばやくキャプチャしたいと考えています。私は現在、次のコードを使用していますが、少し遅れています。より速くなるスクリーンショットを撮るためのより良い方法がありますか?iOS screenshot delay

CGSize imageSize = [[UIScreen mainScreen] bounds].size; 
if (NULL != UIGraphicsBeginImageContextWithOptions) 
    UIGraphicsBeginImageContextWithOptions(imageSize, NO, 1); 
else 
    UIGraphicsBeginImageContext(imageSize); 
[self.view.layer renderInContext:UIGraphicsGetCurrentContext()]; 
UIImage *imageName = UIGraphicsGetImageFromCurrentImageContext(); 
UIGraphicsEndImageContext(); 

答えて

0

あなたはのOpenGLを使用してスクリーンショットを取ることができますが、この方法は、より多くの最も遅いです。プログラムでスクリーンショットを取得する方法は他にありません。