iOS CAKeyframeAnimation rotationMode on UIImageView

后端 未结 3 1367
长发绾君心
长发绾君心 2020-12-14 23:17

I am experimenting with Key Frame animation of the position of a UIImageView object moving along a bezier path. This pic shows the initial state before animation. The blue

3条回答
  •  被撕碎了的回忆
    2020-12-14 23:29

    Yow mention that you kick off the animation with "rotationMode set to YES", but the documentation states that rotationMode should be set using an NSString...

    In particular:

    These constants are used by the rotationMode property.

    NSString * const kCAAnimationRotateAuto

    NSString * const kCAAnimationRotateAutoReverse

    Have you tried setting:

    keyframe.animationMode = kCAAnimationRotateAuto;

    The documentation states:

    kCAAnimationRotateAuto: The objects travel on a tangent to the path.

提交回复
热议问题