CALAyer.frame
怎么样?与其相关 UIView.frame
? (在这种情况下,特别是 UIImageView.frame
)。
鉴于 CALayer.frame
的值可能与其 UIView.frame
不同关注 CAtransform3D
转型,他们不再有任何联系了吗? (随后,我是否应该更关心管理我的 CALayer
的维度,而不是我的 super View 中的 UIImageView
的维度?)。
最佳答案
如果您正在使用 Core Animation 和图层,您应该关注以下 CALayer
特性:
来自 Apple 技术问答 QA1620 的报价 here :
Q: When I try to animate the frame of a CALayer nothing happens. Why?
A: When I try to animate the frame of a CALayer nothing happens. Why?
The frame property of a CALayer is a derived property, dependent on the position, anchorPoint, bounds and transform of the layer. Instead of animating the frame, you should instead animate the position or bounds, depending on what effect you are trying to accomplish.
关于ios5 - UIView.frame 和 CALayer.frame 之间的关系是什么? (在 CATransform3D 之前和之后),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11313991/