How to specify an beginTime for an animation by using CFTimeInterval?

后端 未结 4 1339
情话喂你
情话喂你 2021-01-30 17:57

For my understanding, beginTime can be used to say \"hey, start at exactly 12:00 \'o clock\". But how would I tell this with an CFTimeInterval type? I thought that this one is n

4条回答
  •  轮回少年
    2021-01-30 18:03

    No, that is not what beginTime does. It specifies a relative start time from its parent animation (by default multiple animations in a group all fire at once).

    From the documentation:

    Specifies the begin time of the receiver in relation to its parent object, if applicable.

    timeOffset causes it to start animating at the frame it would be at at the offSet time, and when it reaches the end it loops around. In other words, imagine A,B,C,D,E are frames of animation this is what happends in various cases if you set beginTime or timeOffset to a value equal to when you hit frame C in the normal case.

    Normal      |A->B->C->D->E
    beginTime:  |      A->B->C->D->E
    timeOffset: |C->D->E->A->B
    

提交回复
热议问题