What exactly does removedOnCompletion = NO do?

前端 未结 4 1768
闹比i
闹比i 2021-02-02 00:35

CAAnimation provides the removedOnCompletion property which defaults to YES.

Let\'s recognize these facts:

A) Core Animation only affects the Presentation Tree,

4条回答
  •  醉酒成梦
    2021-02-02 01:14

    removedOnCompletion = YES really is just a shortcut. In most cases I'd discourage using it, but rather set the model values as well.

    Animations that linger around although you don't make use of them may consume energy and bandwidth and mess your logic up, since you can no longer inspect animationKeys to poll (should you ever need that) whether they're already finished.

提交回复
热议问题