Xcode Cheat Sheet PDF
Xcode Cheat Sheet PDF
You shouldn’t waste your time digging for a file in your folder your “perfect” setup.
hierarchy. Instead, you can use Xcode’s “Open Quickly” dialog by c) By double-clicking a tab, you can assign it a name. Named
pressing ⌘ ⇧ O . Simply start typing any part of a file’s tabs can then be used in “Behaviors” (see #5).
name — it doesn’t even have to be consecutive letters: “mwinco”
will find your ”MainWindowController” class.
5. BEHAVIORS
As if that wouldn‘t be cool enough, this dialog also lets you
With “Behaviors”, you can tell Xcode how to react when certain
decide where exactly to open the file: hold down ⌘ ⌥ ⇧
events happen. For example, you could have the console view
while double-clicking the file to bring up the pop-over from #1.
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 ⌘ ⌥ ⌃ 2 . editor and the debugger shown, but the project navigator
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 Xcode’s preferences window.
values you have to fill out when invoking it (e.g. “<#token#>”).
Then highlight and drag that code to the library pane. Apart KEYBOARD SYMBOLS
from naming it, you should also define a “Completion Shortcut”:
⌘ Command key ⌥ Option (alt) key
when you type these letters later, Xcode will offer to substitute
them with your custom snippet. ⌃ Control key ⇧ Shift key
VERSION CONTROL
Go beyond Xcode‘s basic version control support and combine it with Tower — the most powerful Git client for Mac. Try it free for 30 days.