开发者

iphone page curl without uiviewanimation

开发者 https://www.devze.com 2023-01-15 04:38 出处:网络
I am trying to do a partial page curl with the following: CATransition *animation = [CATransition animation];

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 ? @"mapCur开发者_如何学Pythonl" : @"mapUnCurl")];
    [animation setRemovedOnCompletion:NO];
    [animation setFillMode: @"extended"];
    [animation setRemovedOnCompletion: NO];
    notCurled = !notCurled;
    [[delegate.window layer] addAnimation:animation forKey:@"pageFlipAnimation"];

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

Thanks.


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

精彩评论

暂无评论...
验证码 换一张
取 消