简体   繁体   中英

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 :

  • pushViewController in a UINavigationController (also true for popTo)
  • displaying a UIActionSheet
  • switching between views with IIDeckViewController

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM