Awesome Xcode shortcuts to boost your iOS development

Learn shortcuts, Improve workflow, Be faster

Balaji Malliswamy
Swift India

--

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

Find it a good read?

Recommend this post (by clicking 👏 button) so other people can see it too…
reach me on Twitter Balaji Malliswamy

https://twitter.com/blahji

--

--

Balaji Malliswamy
Swift India

iOS Engineer, Technical Lead @ivymobility • Writer @ Swift India Publication • Event Organizer @swiftindiagroup meetups. • https://unsplash.com/@blahji