使用CATransform3DRotate时禁用旋转动画(Disable rotating animation when using CATransform3DRotate)

编程入门 行业动态 更新时间:2024-10-25 09:23:37
使用CATransform3DRotate时禁用旋转动画(Disable rotating animation when using CATransform3DRotate)

我正在尝试使用CATransform3DRotate在屏幕上旋转UIView / UIImageView,但是当我将转换应用于View时,它会显示某种旋转动画。 有什么方法可以禁用它,只是在没有中间效果的情况下获得最终结果?

I'm trying to use CATransform3DRotate to rotate a UIView/UIImageView on screen but it displays some sort of rotation animation when I apply the transformation to the View. Is there any way that I can disable this and just get the final result without the intermediate effect?

最满意答案

[CATransaction begin]; [CATransaction setDisableActions: YES]; // Your code here [CATransaction commit]; [CATransaction begin]; [CATransaction setDisableActions: YES]; // Your code here [CATransaction commit];

更多推荐

本文发布于:2023-08-02 23:59:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1382494.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:动画   CATransform3DRotate   Disable   animation   rotating

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!