是否有可能将一个CATransition动画作为UIImage?

时间:2010-03-31 08:47:13

标签: iphone core-animation uiimage

是否有可能将一个CATransition动画作为UIImage?我举了一个例子:

CATransition *animation = [CATransition animation];
        [animation setDelegate:self];
        [animation setDuration:0.35];
        [animation setTimingFunction:UIViewAnimationCurveEaseInOut];
            animation.type = @"pageCurl";
            animation.fillMode = kCAFillModeForwards;
            animation.endProgress = 0.65;
        [animation setRemovedOnCompletion:NO];
        [self.view.layer addAnimation:animation forKey:@"pageCurlAnimation"];

这是动画,我正在使用。它看起来像这样: http://img269.imageshack.us/img269/8577/bildschirmfoto20100331u.png

如何捕捉这种卷曲效果?问题是我必须从self.view.layer中删除动画,但我稍后需要卷曲图片。是否可以将动画(帧)作为图片? 我不想捕捉整个UIView,只想捕捉动画。

1 个答案:

答案 0 :(得分:1)

您可以使用运行动画时安排的UIGetScreenImage()。这将使您获得屏幕截图作为具有动画效果的图像。 http://www.tuaw.com/2009/12/15/apple-relents-and-is-now-allowing-uigetscreenimage-for-app-st/

的信息
相关问题