“Push” animation in Objective-C

后端 未结 3 1970
名媛妹妹
名媛妹妹 2021-02-09 01:30

I have two views: A and B. A is positioned at the top of the screen, B is positioned at the bottom of the screen.

When the user presses a button, view B animates upward

3条回答
  •  忘掉有多难
    2021-02-09 01:57

    You said that you tried the "animate B and use display link to update A" technique, and that it resulted in "A" lagging behind "B". You could theoretically animate a new view, "C", and then adjust B and A's frames accordingly in the display link, which should eliminate any lag (relative to each other).

提交回复
热议问题