Xcode 4 Shortcuts and Tricks


Here’s a few useful shortcuts and tricks that I’ve found for using Xcode 4. I thought they would be useful to share with you. If you have any that I missed, feel free to share them in the comments! Also, don’t miss my tips on using Accessorizer for other quick shortcuts for development.

Switch Between Header and Implementation File

My favorite is the three-finger swipe up or down to switch between header (.h) and implementation (.m) files. You can also do this with ctrl+command+[up,down,left,right]

One follow on to this, to show the Assistant Editor (the two pane view with header and implementation file), use ctrl+option+command+Up/Down

Comment selection

command+/

Build & Run Project

I use this one all the time to quickly build and run my projects (much faster than moving the mouse up and clicking), anyway the shortcut is command+R

Clean Build

command+shift+K

Switch to Organizer
This is useful after you’ve built an archive for distribution, command+shift+2

Easily Create Outlets
In the Assitant Editor view (the two pane view), have your .xib in one panel and the .h file in the other, now Control-Click and Drag on the interface element and drag to the location you want to create the outlet in your source code.

Xcode Outlet Creation

No comments yet.

Leave a Reply