iPhone页面卷曲没有UIViewanimation [英] iphone page curl without uiviewanimation

查看:89
本文介绍了iPhone页面卷曲没有UIViewanimation的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用以下内容进行部分页面卷曲:

I am trying to do a partial page curl with the following:

    CATransition *animation = [CATransition animation];
    [animation setDelegate:self];
    [animation setDuration:1.0f];
    [animation setTimingFunction:UIViewAnimationCurveEaseInOut];
    [animation setType:(notCurled ? @"mapCurl" : @"mapUnCurl")];
    [animation setRemovedOnCompletion:NO];
    [animation setFillMode: @"extended"];
    [animation setRemovedOnCompletion: NO];
    notCurled = !notCurled;
    [[delegate.window layer] addAnimation:animation forKey:@"pageFlipAnimation"];

不幸的是,它什么也没做。我正在使用最新的SDK。我记得能够在3.0中使用它。

Unfortunately, it does not do anything . I am using the latest SDK. I remember being able to use this in 3.0.

谢谢。

推荐答案

好吧,以上似乎没有工作了,我现在使用以下内容:

Ok it seems that the above does not work anymore, I am using the following now:

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"];

这篇关于iPhone页面卷曲没有UIViewanimation的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆