如果我使用 CATransform3DMakeRotation 旋转图像时将显示锯齿状(抖动)图像
我的图像旋转有问题。
如果我使用 CATransform3DMakeRotation(M_PI, 0, 0, -1.0) 制作带图层的动画,则旋转图像时将显示锯齿状(抖动)图像。
将backgroundView添加到另一个动画视图中(与backgroundView相同,但方向相反)。
代码是:
CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"transform"];
animation.toValue = [NSValue valueWithCATransform3D:CATransform3DMakeRotation(M_PI , 0, 0, -1.0)];
animation.duration = 30;
animation.cumulative = YES;
animation.repeatCount = INT_MAX;
[backgroundView.layer addAnimation:animation forKey:@"animationOne"];
感谢您的宝贵时间。
I have a problem with the image rotated.
The serrated(shake) image will be shown when rotating the image if i use CATransform3DMakeRotation(M_PI, 0, 0, -1.0)
to make a animation with layer.
The backgroundView is added into another animation view (same as the backgroundView, but the direction is reverse).
The code is:
CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"transform"];
animation.toValue = [NSValue valueWithCATransform3D:CATransform3DMakeRotation(M_PI , 0, 0, -1.0)];
animation.duration = 30;
animation.cumulative = YES;
animation.repeatCount = INT_MAX;
[backgroundView.layer addAnimation:animation forKey:@"animationOne"];
Thank you for your time.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题已修复,使用该功能可以去除图像旋转时的锯齿。
The problem is fixed , to use the function can remove the serrate of image when rotating.