XCODE CHEAT SHEET
presented by
NAVIGATION
SEARCH
Find in File
Find & Replace
in File
Find in Project
Find & Replace
in Project
TOWER the most powerful Git client for Mac
Open Quickly
Next Counterpart
J
UP
Previous
Counterpart
DOWN
Next
Recent File
RIGHT
New Tab
Go to Line
Previous Tab
Fold Section
Next Tab
Unfold Section
NAVIGATOR
0
18
Toggle Debug Area
Edit All in Scope
Indent Selection
Comment / Uncomment
LEFT
RIGHT
Move Line Up
Move Line Down
UTILITIES
Next Issue
Show / Hide
'
Switch Tabs
"
open in
Assistant Editor
Toggle Breakpoints
Clear Console
click
DOCUMENTATION
Documentation for
for Selection
/
30-day free trial available at
www.git-tower.com
SPACE
Fix Indentation
Show Documentation
click
Help for Clicked Symbol
Documentation for
Clicked Symbol
RETURN
open in New Window double click
Toggle Completions
Add Breakpoint
click
RETURN
Previous Issue
Outdent Selection
When Clicking a File in Navigator
decide where
to open
Hide Assistant
Editor
DEBUGGING
Show / Hide
LEFT
Show Assistant
Editor
Definition of Symbol
Switch Tabs
Move Focus to Editor
Previous
Recent File
TABS
EDITING
BUILD & RUN
Build
Run
Stop
click
double click
19
Analyze
Test
Clean
the most powerful Git client for Mac
XCODE TIPS & TRICKS
presented by
TOWER the most powerful Git client for Mac
1. DECIDE WHERE TO OPEN A FILE
4. TABS
In Xcode, you can open a file in various ways: in the standard
Tabs are well-known from almost every IDE and text editor.
editor, in a new or existing assistant editor, in a new or existing
However, three things make tabs in Xcode especially powerful:
tab, or in a new window. Heres how you can decide about this:
When clicking on a file in the Navigator, hold down
utilities area. You can therefore configure tabs that are
optimized for different use cases (like coding, debugging,
A pop-over will appear and let you choose where exactly you
want the file to be displayed.
Xcode restores its tabs including their unique structure.
This makes it worthwhile to take some time to configure
You shouldnt waste your time digging for a file in your folder
hierarchy. Instead, you can use Xcodes Open Quickly dialog by
interface builder tasks, etc).
b) Tabs persist in a workspace. When reopening a project,
2. OPEN QUICKLY
pressing
could contain just two editor panes, while another one could
contain the project navigator, a single editor pane, and the
When clicking on a symbol in an editor pane, hold down
a) Each tab can be configured individually. For example, one tab
O . Simply start typing any part of a files
your perfect setup.
c) By double-clicking a tab, you can assign it a name. Named
tabs can then be used in Behaviors (see #5).
name it doesnt even have to be consecutive letters: mwinco
will find your MainWindowController class.
5. BEHAVIORS
As if that wouldnt be cool enough, this dialog also lets you
decide where exactly to open the file: hold down
while double-clicking the file to bring up the pop-over from #1.
With Behaviors, you can tell Xcode how to react when certain
events happen. For example, you could have the console view
shown whenever your app starts running, or you could have a
new tab opened whenever you start a search.
3. CUSTOM CODE SNIPPETS
This becomes even more powerful when combined with named
Whenever you find yourself typing the same bits of code mul-
tabs. For example, whenever your app pauses, you can have
tiple times, you should create a code snippet. To do that, first
Xcode open your named tab Debug a tab that you configu-
make sure that the Code Snippet Library pane is displayed
red exactly how you want it to look (maybe with an assistant
by pressing
editor and the debugger shown, but the project navigator
2 .
Now go back to your editor pane and start typing what will soon
hidden).
be a custom snippet and remember to insert placeholders for
Behaviors can be configured in Xcodes preferences window.
values you have to fill out when invoking it (e.g. <#token#>).
KEYBOARD SYMBOLS
Then highlight and drag that code to the library pane. Apart
from naming it, you should also define a Completion Shortcut:
when you type these letters later, Xcode will offer to substitute
Command key
Option (alt) key
them with your custom snippet.
Control key
Shift key
VERSION CONTROL
Go beyond Xcodes basic version control support and combine it with Tower the most powerful Git client for Mac. Try it free for 30 days.
30-day free trial available at
www.git-tower.com
the most powerful Git client for Mac