2013-04-01 36 views
0

我想捕获图像间转换的屏幕截图。如何捕获转换的屏幕截图

- (UIImage *)captureView:(UIView *)view 
{ 
    CGRect screenRect = [[UIScreen mainScreen] bounds]; 
    UIGraphicsBeginImageContext(screenRect.size); 
    CGContextRef ctx = UIGraphicsGetCurrentContext(); 
    [[UIColor blackColor] set]; 
    CGContextFillRect(ctx, screenRect); 
    [view.layer.presentationLayer renderInContext:ctx]; 
    UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext(); 
    UIGraphicsEndImageContext(); 
    return newImage; 
} 

我图像的播放UIImageView的转变过程中调用此方法,但是,我刚刚在UIImageView的静止图像,但不能捕捉图像之间的过渡。 任何人都可以帮助我?

回答

0

在模拟器中,您可以点击3次移动来减慢动画速度,然后您就可以抓住转换。

+1

我认为你误解了。他需要以编程方式进行。:) – Ganapathy

+0

感谢texian,但是我仍然无法在按住Shift键3次后赶上过渡。我错过了什么? – user2227366

相关问题