我正在使用CATransition进行部分卷曲,它工作正常但在主页按钮单击而页面弯曲并尝试恢复时,弯曲页面消失。
这是我的代码
self.animation = [CATransition animation];
[self.animation setDelegate:self]; [animation setDuration:1.00];
[self.animation setTimingFunction:UIViewAnimationCurveEaseInOut];
if (!curled){
self.animation.type = @"pageCurl";
self.animation.fillMode = kCAFillModeForwards;
self.animation.endProgress = 0.50;
}
[self.animation setRemovedOnCompletion:NO];
[[self view] exchangeSubviewAtIndex:0 withSubviewAtIndex:1];
[[[self view] layer] addAnimation:self.animation forKey:@"pageCurlAnimation"];
答案 0 :(得分:0)
这可能对您有所帮助
-(void)viewWillDisappear:(BOOL)animated{
[self.view.layer removeAllAnimations];
[super viewWillDisappear:YES];
}