【发布时间】:2012-04-23 15:05:12
【问题描述】:
我正在为水族馆开发 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、scrollview 无法正常工作。滚动越来越延迟,而且不流畅。谁能解决这个问题?
【问题讨论】:
-
你永远不会用 [UIView commitAnimations] 关闭动画
标签: iphone ios core-animation uiviewanimation