开发者

Monotouch animation acceleration

开发者 https://www.devze.com 2023-02-19 06:13 出处:网络
Is it possible to create an animation with increasing speed? Something like accelerated animation. I have some code but cannot find a way how to implement it. Googling also not helpful.

Is it possible to create an animation with increasing speed? Something like accelerated animation.

I have some code but cannot find a way how to implement it. Googling also not helpful.

CABasicAnimation animation =  CABasicAnimation.FromKeyPath(开发者_如何转开发"opacity");
animation.To = NSNumber.FromFloat( 0.1f );
animation.Duration = 1.4f;
animation.Delegate = new ExponencialSpeedAnimationDelegate();
animation.RepeatCount = 3;
this.Layer.AddAnimation(animation, "opacity");


Try

animation.TimingFunction = CAMediaTimingFunction.FromName (CAMediaTimingFunction.EaseIn);
0

精彩评论

暂无评论...
验证码 换一张
取 消