问题
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"];
Unfortunately, it does not do anything . I am using the latest SDK. I remember being able to use this in 3.0.
Thanks.
回答1:
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"];
来源:https://stackoverflow.com/questions/3652432/iphone-page-curl-without-uiviewanimation