当前位置:编程学习 > wap >>

CABasicAnimation动画完成后,界面闪烁

      CABasicAnimation执行动画完成后,创建的layer又回到的之前的位置,并且闪烁一下,需要创建的动画添加一下两行代码:

                    CABasicAnimation *animation =  [CABasicAnimation animationWithKeyPath:@"transform.translation.x"];


                    animation.removedOnCompletion = NO;

                    animation.fillMode = kCAFillModeForwards

补充:移动开发 , IOS ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,