The iOS 5 Developer’s Cookbook: Six Fabulous Xcode Tricks
Switching Between Counterparts
If you're viewing an implementation (.m) file and want to jump to its header (.h) counterpart or vice versa, type Control-Command-Up Arrow. This keyboard shortcut instantly switches between files. If you're already in the assistant counterpart view, the two files will change places. The file that had been on the left will jump to the right.
Download Additional Sdks
Xcode does not automatically install with legacy SDK support. Want to install iOS 3.x or 4.x support? Open Preferences (Command-,) > Downloads > Components and install each element you want on an item-by-item basis.
Save Disk Space
Working on a system with limited disk space? You can move a great number of Xcode components off-disk by installing the SDK to the external drive. When you do so, Xcode only takes up a few hundred Megabytes of storage rather than several gigabytes on your primary system. What's more, you can also move build products and archives off disk. Open Preferences (Command-,) > Locations and set custom folders for your Derived Data, Snapshots, and Archive files.
Show Line Numbers
Xcode offers an easy-to-access preference that allows you to switch on line numbers in the editor. Check Preferences (Command-,) > Text Editing > Line numbers and instantly add numbering to each code line. Want to jump to a line in-code? Type Command-L, enter a line number, and press return.
Select Debug Output
By default, the debug output area (Command-Shift-Y) shows both the visual debugger and the console. Three small buttons at the top-right of this pane allow you to control which elements you view. Only interested in console output? Click the rightmost rectangle. Want to see both? Click the middle. Pick the presentation that best works for you. And don't forget, you can choose your console debugger in the scheme edit menu. Locate the active scheme (to the right of the Run-Stop buttons at the top left of the editor window), choose Edit Scheme from that pop-up, then select Run > Info > Debugger. Choose between GDB and LLDB.