ios5 - UIView.frame 和 CALayer.frame 之间的关系是什么? (在 CATransform3D 之前和之后)

标签 ios5 uiview uiimageview calayer

CALAyer.frame 怎么样?与其相关 UIView.frame ? (在这种情况下,特别是 UIImageView.frame )。

鉴于 CALayer.frame 的值可能与其 UIView.frame 不同关注 CAtransform3D转型,他们不再有任何联系了吗? (随后,我是否应该更关心管理我的 CALayer 的维度,而不是我的 super View 中的 UIImageView 的维度?)。

最佳答案

如果您正在使用 Core Animation 和图层,您应该关注以下 CALayer特性:

  • 职位
  • 边界
  • anchor
  • 变换

  • 来自 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/

    相关文章:

    iphone - PDF Reader 的缓存问题

    iphone - 删除索引 0 处的 CALayer

    ios - 当动画 UIImage 被分配两次时,UITableViewCell 中的 UIImageView 没有动画

    iphone - 在子类 UIImageView 中,touchesBegan 触发,touchesMoved 触发几次,但随后无缘无故停止

    ios - 如何在 iOS 中将以下字符 ‡、†、* 作为上标附加到 NSString

    objective-c - NSFetchedResultsController 在 performFetch 之后忽略 fetchLimit

    ios - 使用 UIAccelerometer 创建关卡应用

    ios - 当所有文本被选中时,UITextView 改变位置

    objective-c - iOS 上的快速模糊

    objective-c - 更改 UIView alpha 值