Awesome Xcode shortcuts to boost your iOS development

Learn shortcuts, Improve workflow, Be faster

Balaji Malliswamy
Dec 3, 2018 · 5 min read

Learning Xcode keyboard shortcuts will improve your workflow, productivity and make you a faster iOS or Mac app developer. There are many keyboard shortcuts in Xcode that can make yourself a more efficient programmer. I’ve put together a cheat sheet for a number of frequently used keyboard shortcuts in Xcode 10.

Keys

  • ⌘ - Command
  • ⇧ - Shift
  • ⌥ - Option/Alt
  • ⌃ - Control
  • ⇠⇢ - Left/Right Arrow Keys
  • ⇡⇣ - Up/Down Arrow Keys
  • ⏎ - Return
  • ⇥ - Tab
  • Escape

Workspace Organization

1. Hide / Show Navigation Area : ⌘+0

⌘0 (cmd+0)

2. Hide/Show Debugging Area : ⌘+⇧+Y

⌘⇧Y (cmd+shift+Y)

3. Hide/Show Utility Area : ⌘+⌥+ 0

⌘⌥ 0 (cmd+option+0)

4. Split screen/open Assistant Editor in the Editor Area : ⌘ +⌥ + ⏎

⌘ ⌥ ⏎ (cmd+option+return) to show | ⌘⏎ (cmd+return) to Hide

5. Opens a new tab above the navigator, editor & utility areas : ⌘ + T

⌘T (cmd+T)

6. Close the current tab : ⌘ + W

⌘E (cmd+E)

Code Formatting & Beautification

1. Confirms the auto-completion suggestion : ⇥ OR ⌃ + /

⌃/ (control + /) to finish the suggestion

2. Comment or Uncomment : ⌘ + /

⌘/ (cmd+/)

3. Re-indent the whole function: ⌃ + I

Fix the indentation for the selected lines of code : ⌃I (Ctrl + I)

4. Hides / expands a class or method body :⌥+⌘+⇢ OR ⌥+⌘+⇠

⌥+⌘+⇢ OR ⌥+⌘+⇠ (option + cmd + ⇠ / ⇢)

5. Auto documentation : ⌘ +⌥ + /

Provides a documentation template (cmd+option+/)

Debugging

1. Add and Remove breakpoints : ⌘ + \

⌘ + \ (cmd + \)

2. Disable/Enable all breakpoints : ⌘ + Y

⌘ + Y (cmd + Y)

Building

  1. Build : ⌘ + B
  2. Run & Build if necessary :⌘ + R
  3. Stop the current build/run/testing : ⌘ + .
  4. Run tests & Build if necessary: ⌘ + U
  5. Clean : ⌘ + K
  6. Clean All files and build folder : ⇧ + ⌘ + K
  7. Profile (Instruments): ⌘ + I
  8. Choose scheme : ⌃ + 0
  9. Choose Destination : ⌃ + ⇧ + 0
  10. Re-run the last run tests : ⇧ + ⌘ + ⌥ + G

Navigation And Information

1. Jump to a line : ⌘ + L

Jumps to a code line (cmd + L)

2. Left panel tabs switch : ⌘ + (1–7)

Navigate through the 9menu options in the Navigator : (cmd + 1 to 9)

3. Right panel tabs switch :⌘ +⌥ + 1-6

Navigate the menu options in the Utility Area : cmd + option + (1–6)

4. Search for lines of text in your files : ⌘+⇧+F

Searches through file browser (cmd+shift+F)

5. Quick find/open : ⇧ + ⌘ + O

Open Quickly (shift + cmd + O)

Simulator

  1. Copy current screen : ⌃ + + C
  2. Take Screenshot : ⌘ + S
  3. Go to Home :⇧+ ⌘ + H
  4. Shake Gesture : ⌃ + + Z
  5. Toggle software keyboard : ⌘ + K

Walking on water and developing software from a specification are easy if both are frozen.

— Edward V Berard


👏 reach me

https://twitter.com/blahji

Swift India

Swift Developer Community in India 🇮🇳

Balaji Malliswamy

Written by

 developer, Chennai & Writer at Swift India https://about.me/balajimalliswamy , https://unsplash.com/@blahji

Swift India

Swift Developer Community in India 🇮🇳

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade