XCode Tricks for Tuning Core Animations
I was looking for a way to tune an animation to get the right feel. It was getting frustrating to modify, rebuild, recompile and retest for every little change. When the tuning is more of a feel than a right / wrong check, this was driving me mad. By the time you changed the code, the feel was gone!
I remembered two XCode features that I thought might help, Runtime variable modification and Breakpoint Actions.
- Variable Modification
If constants are moved into the function that starts the animation and they are static, they show up in the debug window.

If variables are static, the state sticks around to subsequent invocations. This allows you to tune the constants, get a feel for it, and tune it again.
- Breakpoint Actions
Another thing that helps when getting a feel for how your code is interacting with the phone is to add breakpoint sounds. This will can cause XCode to play a sound or print a variable. Select the breakpoint in the breakpoint group in the main tree, expand and press the + button.

This wasn’t as helpful as I thought as the sound plays inline and causes a UI hickup. Still an interesting trick so I thought I’d throw it out there. Also while I was mucking around I found that you could print out variables right in GDB, which could be nice if you want to log something but not rebuild.
Anyone have any other good XCode tricks?
