【问题标题】:How to capture the screen shot for transition如何捕获用于过渡的屏幕截图
【发布时间】:2013-04-01 12:31:48
【问题描述】:

我想为图像之间的过渡截取屏幕截图。

- (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 中获得静止图像,但无法捕获图像之间的过渡。 任何人都可以帮助我吗?

【问题讨论】:

    标签: iphone ios ios4


    【解决方案1】:

    在模拟器中你可以按 3 次 shift 来减慢动画的速度,然后你也许可以捕捉到过渡。

    【讨论】:

    • 我想你误会了。他需要以编程方式进行。:)
    • 感谢 texian,但是在按 Shift 键 3 次后我仍然无法捕捉到过渡。我错过了什么?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-04-06
    • 2011-10-13
    • 1970-01-01
    相关资源
    最近更新 更多