简体   繁体   English

涟漪效果动画

[英]ripple effect animation

I'm developing iPhone app for aquarium. 我正在为水族馆开发iPhone应用程序。 In that i used ripple effect code as follows: 在那我使用了涟漪效应代码,如下所示:

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];

It's working great, but the problem is after calling this animation: tableview, textview, scrollview in my app are not working properly. 效果很好,但是问题出在调用此动画之后:我的应用程序中的tableview,textview,scrollview无法正常工作。 Scroll is getting delay and it's not smooth. 滚动变得延迟,并且不流畅。 Could anyone fix this problem? 谁能解决这个问题?

Beware that that transition effect is undocumented. 请注意,这种过渡效果是没有记载的。 I asked Apple's engineers about using animation types that are not in the docs. 我问苹果工程师关于使用文档中没有的动画类型的问题。 They said that while their automated tools will not detect this sort of thing, it is still an undocumented API, and as such, is against their guidelines and you risk your app being rejected if you use them. 他们说,虽然他们的自动化工具无法检测到这种情况,但它仍然是一个未记录的API,因此违反了他们的准则,如果您使用它们,则可能会导致应用被拒绝的风险。

Since you are using an undocumented transition effect, you are on your own as far as figuring out how to make it work correctly. 由于您使用的是未记录的过渡效果,因此您只能自己弄清楚如何使其正确工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM