keyboard mac

Useful Xcode Shortcuts

As an iOS developer, you spend a significant amount of time in Xcode. Leveraging keyboard shortcuts can help you work faster, boost productivity, and stay focused on coding rather than navigating through menus. In this post, we’ll cover the most useful shortcuts every iOS developer should know.

Basic Shortcuts

  1. Running and Stopping the App
    • Run: Command (⌘) + R
    • Stop: Command (⌘) + .
  2. Building
    • Build the Project: Command (⌘) + B
    • Clean Build: Shift + Command (⌘) + K
  3. Commenting Code
    • Add/Remove Comment: Command (⌘) + /
  4. Quick Code Formatting
    • Re-indent: Control (⌃) + I
  5. Opening Files
    • Quick Open: Command (⌘) + Shift + O – Quickly find files, classes, or methods.

Code Navigation

  1. Jump to Definition
    • Jump to Definition: Command (⌘) + Click on a method or variable name.
  2. Navigate Backward and Forward
    • Backward: Command (⌘) + Control (⌃) + ←
    • Forward: Command (⌘) + Control (⌃) + →
  3. Search the Project
    • Find in Project: Command (⌘) + Shift + F – Search through the entire project.
  4. Switch Between Files
    • Quick Switch: Control (⌃) + Tab
  5. Show Command Palette
    • Command Palette: Command (⌘) + J – Provides quick access to various options within Xcode.

Debugging Shortcuts

  1. Adding Breakpoints
    • Toggle Breakpoint: Command (⌘) + ‼
  2. Continue Execution
    • Continue: Command (⌘) + ⌄ + Y
  3. Step Over/Into/Out
    • Step Over: F6
    • Step Into: F7
    • Step Out: F8

Working with the Interface

  1. Toggling Panels
    • Show/Hide Navigator: Command (⌘) + 0
    • Show/Hide Debug Area: Shift + Command (⌘) + Y
    • Show/Hide Utilities Panel: Option (⌥) + Command (⌘) + 0
  2. Editor Modes
    • Standard Editor: Command (⌘) + Return
    • Assistant Editor: Option (⌥) + Command (⌘) + Return
    • Version Editor: Control (⌃) + Command (⌘) + Return

Productivity Tips and Tricks

  1. Quickly Creating New Files
    • New File: Command (⌘) + N
  2. Searching Symbols in a File
    • Symbol Search: Control (⌃) + 6
  3. Bookmarking Lines of Code
    • Add Bookmark: Command (⌘) + ‼
  4. Editing and Moving Lines of Code
    • Move Line Up/Down: Option (⌥) + Shift + ↑/↓
  5. Deleting Words
    • Delete Word Backward: Option (⌥) + Delete

Using shortcuts can save you a lot of time and enhance your efficiency.

Consider creating your own personalized cheat sheet with the shortcuts you use most frequently.

One useful shortcuts cheat sheet you can find here on official Github website:

https://swifteducation.github.io/assets/pdfs/XcodeKeyboardShortcuts.pdf

Similar Posts