0

我正在使用 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"];
4

1 回答 1

0

这可能会帮助你

-(void)viewWillDisappear:(BOOL)animated{

[self.view.layer removeAllAnimations];
[super viewWillDisappear:YES];
}
于 2012-12-24T13:12:56.177 回答