iWheelBuy
iWheelBuy

Reputation: 5679

CADisplayLink catches animation with delay

Trying to reproduce behaviour described in this article. Line by line. Everything works well but the last step...

The problem is: I unpause CADisplayLink just before calling UIView.animate and expect the unpaused CADisplayLink to call the attached selector on main thread during animation. It does work, but it starts to call the attached selector with a half a second delay.

Any suggestions?

enter image description here

Upvotes: 2

Views: 477

Answers (1)

Dominion
Dominion

Reputation: 222

It seems that you've chosen a wrong RunLoopMode. With RunLoopMode.commonModes it works like a charm. Look here for a detailed answer.

Upvotes: 1

Related Questions