Romain Dorange
Romain Dorange

Reputation: 831

All UIView animation / transitions becoming non-animated after a while?

I have a strange issue both on mobile device and in simulator.

After a while spent in the application, animations on UIView are disabled (like if animated was set to NO), notably on :

This is quite strange as all transition are usually animated, and in a non predictable way, they all become non-animated

Everything was working well a few days agos, and as far as I can remind, I did not make any changes that should lead to such a behavior.

Any ideas ?

Thanks

Cheers

Upvotes: 0

Views: 288

Answers (1)

troppoli
troppoli

Reputation: 558

We recently had some trouble like this, the culprit was initiating some animations from a non-main thread (perhaps you are initiating a transition). This caused some trouble with animations transactions getting rolled back and this broke animations until the transaction was rolled back. There were some entries on the console pointing to CA transactions. Setting CA_DEBUG_TRANSACTIONS=1 on the environment quickly revealed the stack of where the the transactions were started.

The fix was to not do anything that would create transactions from a non-main thread.

Upvotes: 1

Related Questions