Here are some very basic navigation tips every programmer that works with Xcode must know and use them.
Tip 1. Go to the beginning or the end of line
Here is a quick tip: to go to the beginning of a code line in Xcode press:
Cmd + left arrow key
To go to the end of line press:
Cmd + right arrow key
Tip 2. Jump from word to word
To jump from word to word press:
Alt + left arrow key (to jump to left word)
Alt + right arrow key (to jump to right word)
Tip 3. Move cursor a page up or down
To move cursor one page up press:
Alt + Page Up key
To move the cursor one page down press:
Alt + Page Down key
To activate spotlight search from Keyboard on your OSX machine just press:
Command + Space
Let’s say you want to build a Command Line Tool in XCode 4 and you want to link an existing framework with your app.
In order to do that go to your project then select your target, then choose Build Phases, then add the framework at section Link Binary With Libraries.
If you have multiple copies of a project with source-code files and you don’t know
howto quickly compare in order to find out which of them is newer, or what changes you’ve
made to the source code.
You will find this small app in: /Developer/Applications/Utilities
If you are not able to empty trash for example because the file you’ve just moved there is
locked and you get the error: “Cannot delete because file is in use.”
the just right click to empty trash and at the same time hold Option key.
You will notice when right clicking that “empty trash” is now “secure empty trash”.
If you want to take a snapshot of your screen on OSX Lion, Snow Leopard or Leopard press:
Shift + Command + 3 Keys simultaneously. The screenshot will be saved as a .PNG file on the desktop.
To find more shortcuts look into: System Preferences -> Keyboard -> Keyboard Shortcuts (tab).
Sometimes when developing iPhone or iPad applications you need to use multiple computers but you only have one license.
That license generated after signing a certificate request using a private key on first computer you used.
If you try to download the certificate from Apple’s iOS Provisioning portal on second computer you will
notice the certificate is not working for second computer. That’s because it was generated using first
computer private key.
You can display a picture in OSX’s Preview in actual size of that image using:
Command + ‘0 ‘ (zero key)
If you want to zoom on that image use:
Command + ‘+’ to zoom in
Command + ‘-‘ to zoom out
There’s also ‘zoom to fit’ option, and the shortcut is Command + ‘9’
A quick way to empty trash on OSX is with:
Option (Alt) + Shift + Command + Delete – will empty trash without any confirmation
Shift + Command + Delete – will empty trash with confirmation window
If you want to move selected file(s) to trash use:
Command + Delete
Note that Option key on Mac keyboards is Alt key on a regular (PC) keyboard and Delete key from Mac keyboard is backspace key on a regular keyboard. Also note that when you are in a Firefox browser and you try to delete using those shortcuts it might not work, Firefox use some of them for other purposes.