问题
I'm getting this warning in the log window of the debugger:
CoreAnimation: warning, deleted thread with uncommitted CATransaction; set CA_DEBUG_TRANSACTIONS=1 in environment to log backtraces.
I have to find out what code of mine is calling CATransaction so I can make sure it is running on the main thread. My code doesn't call CATransaction directly. I.e. a search of my code for CATransaction turns up nothing.
In Xcode 5, what is the correct way to set CA_DEBUG_TRANSACTIONS=1 in the environment?
Thanks in advance to all for any info.
回答1:
Product -> Scheme -> Edit Scheme
Select "Run" entry and then "Arguments" tab, and in "Environment Variables" add "CA_DEBUG_TRANSACTIONS" as Name and "1" as "Value".
来源:https://stackoverflow.com/questions/23867470/xcode-how-to-set-ca-debug-transactions-1