Xcode cheat-sheet | Every iOS Dev needs this!

CodingRasi
5 min readSep 5, 2024

--

Hi everybody,

In this article, I am going to talk about Xcode and also you need to save this article in somewhere, because here you have a cheat-sheet for Xcode where you can open & see just with one click. This article might worth more than pepecoin. 🤠

If you read my articles but haven’t subscribed yet, I strongly suggest you do so now, because I’ll soon be sharing some amazing news that you won’t want to miss. 😉 Oh, also, if you want to learn iOS Development, I strongly suggest you to checkout my Udemy course by clicking here. You won’t regret. 🤠

And here is the special code for my Medium followers/readers: FORMEDIUM

But before, let me ask you my usual question:

Did you read my previous articles? 🤔 If not, then here they are: 👀

Ok, now let’s start with our main topic. 🧐

Xcode is Apple’s official IDE. It is a single place where we can write our code, design our app’s interface, test our app on different devices, and debug any issues. It is packed with tools that make our life not only easier, but also more efficient and productive. It does not matter if we are building a simple app, just doing some practice or working on a complex applications that is used by millions of users. For all options, Xcode is our best friend. If you just started learn iOS development, then let me introduce your future best friend to you. Knowing how to use Xcode with shortcuts will make your day easier, and so other people’s day.

General shortcuts

  • To create a new project: Cmd + Shift + N
  • To create a new file: Cmd + N
  • To open project: Cmd + O
  • To close project: Cmd + Shift + W
  • To close current tab: Cmd + W
  • Save all files: Cmd + S
  • Show project navigator: Cmd + 1
  • Show Symbol Navigator: Cmd + 2
  • Show Find Navigator: Cmd + 3
  • Show Issue Navigator: Cmd + 4
  • Show Debug Navigator: Cmd + 5
  • Show Breakpoint Navigator: Cmd + 6
  • Show Report Navigator: Cmd + 7
  • Toggle Navigator Pane: Cmd + 0
  • Toggle Utilities Pane: Cmd + Option + 0
  • Toggle Debug Area: Cmd + Shift + Y
  • Hide/Show Toolbar: Cmd + Option + T
  • Show/Hide Console: Cmd + Shift + C
  • Jump to definition: Cmd + Ctrl + J

Code Navigation and Editing

  • Show/Hide Code Folding Ribbon: Cmd + Option + Shift + Left Arrow
  • Fold Code: Cmd + Option + Left Arrow
  • Unfold Code: Cmd + Option + Right Arrow
  • Fold All Methods/Functions: Cmd + Option + Shift + Left Arrow
  • Unfold All Methods/Functions: Cmd + Option + Shift + Right Arrow
  • Comment/Uncomment Line: Cmd + /
  • Duplicate Line: Cmd + Shift + D
  • Move Line Up: Cmd + Option + [
  • Move Line Down: Cmd + Option + ]
  • Find in File: Cmd + F
  • Find in Workspace: Cmd + Shift + F
  • Find Next Occurrence: Cmd + G
  • Find Previous Occurrence: Cmd + Shift + G
  • Jump to Line: Cmd + L
  • Show Quick Help: Cmd + Option + /

Building, Running, and Debugging

  • Run: Cmd + R
  • Build: Cmd + B
  • Stop: Cmd + .
  • Test: Cmd + U
  • Clean Project: Cmd + Shift + K
  • Build for Profiling: Cmd + Shift + I
  • Build and Archive: Cmd + Shift + B
  • Step Over (while debugging): F6
  • Step Into (while debugging): F7
  • Step Out (while debugging): F8
  • Toggle Breakpoint: Cmd + \
  • Enable/Disable Breakpoints: Cmd + Y
  • Continue Execution (while debugging): Cmd + Ctrl + Y

Interface Builder (Storyboards/XIBs)

  • Toggle between Code and Interface Builder: Cmd + Option + Return
  • Align Objects: Cmd + Option + =
  • Add Constraint: Cmd + Option + Ctrl + C
  • Embed in Stack View: Cmd + Option + Ctrl + S
  • Open Size Inspector: Cmd + Option + 5
  • Open Connections Inspector: Cmd + Option + 6

Refactoring and Code Transformation

  • Rename Symbol: Ctrl + Cmd + E
  • Edit All in Scope: Cmd + Option + E
  • Refactor Code: Cmd + Ctrl + T
  • Convert to Objective-C (Swift to ObjC): Cmd + Ctrl + Option + E

Git Version Control

  • Commit Changes: Cmd + Option + Ctrl + C
  • Pull Changes: Cmd + Option + Ctrl + P
  • Push Changes: Cmd + Option + Ctrl + X
  • Show Source Control Navigator: Cmd + 2
  • Show History for File: Cmd + Option + Ctrl + H
  • Toggle Git Blame View: Cmd + Option + Ctrl + B

Interface & Window Management

  • Show Assistant Editor: Cmd + Option + Return
  • Show Standard Editor: Cmd + Return
  • Switch Between Assistant and Standard Editor: Cmd + Shift + Return
  • Switch Between Tabs: Cmd + Shift + [ or ]
  • Navigate Open Tabs: Cmd + Option + Shift + [ or ]
  • Go to Previous Location: Cmd + Ctrl + Left Arrow
  • Go to Next Location: Cmd + Ctrl + Right Arrow
  • Minimize Xcode Window: Cmd + M
  • Close Tab: Cmd + W

Miscellaneous

  • Show Documentation and API Reference: Cmd + Shift + 0
  • Open Developer Tools: Cmd + Option + Shift + D
  • Show Call Hierarchy: Cmd + Option + Ctrl + J
  • Show Quick Documentation: Cmd + Option + /

Oh you want to thank me: You have couple of options: clap, comment, share, follow or buy me a coffee. 🙂

Subscribe to my Youtube channel

Follow me on X

Be Patreon

--

--

CodingRasi

I speak 6 human and 5 programming languages. 🥳  iOS Developer. To support me: https://codingrasi.com