0

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

    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 中使用它。

谢谢。

4

1 回答 1

0

好的,以上似乎不再起作用,我现在正在使用以下内容:

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"];
于 2010-09-06T15:12:49.493 回答