将多个变换应用于UIView / CALayer [英] Applying multiple transforms to a UIView / CALayer

查看:153
本文介绍了将多个变换应用于UIView / CALayer的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对UIView应用多个变换有没有问题,它是相应的CALayer?

Is there any problem applying multiple transforms to a UIView and it's corresponding CALayer?

具体来说,你可以混合和匹配CATransform3Ds与CGAffineTransforms不会遇到问题?

Specifically, can you "mix and match" CATransform3Ds with CGAffineTransforms without running into issues?

同时在同时动画另一个变换时设置一些变换有什么问题吗?

Also are there any problems with setting some transforms directly while animating another transform change simultaneously?

推荐答案

我意识到这不回答问题完全(或接近),但如果你只使用CGAffineTransforms,你可以使用 CGAffineTransformConcat()来组合多个变换。

I realize this doesn't answer the question entirely (or come close), but if you're only working with CGAffineTransforms you can use CGAffineTransformConcat() to combine multiple transforms.

当一些变换是动画而其他变换不是,只要你适当地连接转换,这将工作很好。我不知道这是如何工作,当你也在做图层转换。

This will work just fine when some transforms are animated and others are not, as long as you concat the transformations properly. I don't know how this works when you're also doing layer transforms.

这篇关于将多个变换应用于UIView / CALayer的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆