2012-04-23 43 views
2

我正在開發iPhone應用程序的水族館。在我使用的連鎖反應代碼如下:漣漪效應動畫

CATransition *animation = [CATransition animation]; 

[animation setDelegate:self]; 
[animation setDuration:0.6]; 
[animation setTimingFunction: [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]]; 

animation.type = @"rippleEffect"; 
animation.subtype = kCATransitionFromLeft; 
animation.fillMode = kCAFillModeBackwards; 
animation.startProgress = 0.4; 
[animation setRemovedOnCompletion:NO]; 

[self.view.layer addAnimation:animation forKey:@"rippleEffect"]; 
[self performSelector:@selector(fn_btnOperation) withObject:nil afterDelay:0.40]; 

[UIView beginAnimations:nil context:NULL]; 
[UIView setAnimationDuration:0.70]; 

它的工作很好,但問題是在調用這個動畫後:tableview中,TextView的,滾動視圖在我的應用程序不能正常工作。滾動延遲,並不平穩。誰能解決這個問題嗎?

+1

你永遠不會用[UIView commitAnimations]關閉動畫 – 2013-04-02 09:02:08

回答

1

請注意,該過渡效果是無證的。我問蘋果的工程師有關使用不在文檔中的動畫類型。他們表示,雖然他們的自動化工具無法檢測到這種情況,但它仍然是一個未公開的API,因此違反了他們的準則,並且如果您使用它們,您的應用程序將被拒絕。

由於您正在使用未公開的過渡效果,因此您應該自行確定如何使其正常工作。