Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有几行文字(标签)已添加到画布中。我正在为一个形状设置动画,以便它从画布外部移动到其中一个标签的正下方。
当我运行以下代码时:
-(void)showContent { shapeonpage1.animationDuration = 10.0f; shapeonpage1.origin = CGPointMake(0,0); }
...动画形状首先出现缓慢移动,然后逐渐加速,并在到达目的地时再次减速。
有没有办法让我的动画形状不加速和减速,而是以一致的速度移动?
最简单的方法是将for设置animationOptions为。像这样:shapeonpage1LINEAR
animationOptions
shapeonpage1
LINEAR
-(void)showContent { shapeonpage1.animationDuration = 10.0f; shapeonpage1.animationOptions = LINEAR; shapeonpage1.origin = CGPointMake(0,0); }
不幸的是,没有多少例子可以展示如何充分使用动画选项。但是,您可以查看 C4Control 文档以获取更多信息。