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
- Running and Stopping the App
- Run:
Command (⌘) + R
- Stop:
Command (⌘) + .
- Run:
- Building
- Build the Project:
Command (⌘) + B
- Clean Build:
Shift + Command (⌘) + K
- Build the Project:
- Commenting Code
- Add/Remove Comment:
Command (⌘) + /
- Add/Remove Comment:
- Quick Code Formatting
- Re-indent:
Control (⌃) + I
- Re-indent:
- Opening Files
- Quick Open:
Command (⌘) + Shift + O
– Quickly find files, classes, or methods.
- Quick Open:
Code Navigation
- Jump to Definition
- Jump to Definition:
Command (⌘) + Click
on a method or variable name.
- Jump to Definition:
- Navigate Backward and Forward
- Backward:
Command (⌘) + Control (⌃) + ←
- Forward:
Command (⌘) + Control (⌃) + →
- Backward:
- Search the Project
- Find in Project:
Command (⌘) + Shift + F
– Search through the entire project.
- Find in Project:
- Switch Between Files
- Quick Switch:
Control (⌃) + Tab
- Quick Switch:
- Show Command Palette
- Command Palette:
Command (⌘) + J
– Provides quick access to various options within Xcode.
- Command Palette:
Debugging Shortcuts
- Adding Breakpoints
- Toggle Breakpoint:
Command (⌘) + ‼
- Toggle Breakpoint:
- Continue Execution
- Continue:
Command (⌘) + ⌄ + Y
- Continue:
- Step Over/Into/Out
- Step Over:
F6
- Step Into:
F7
- Step Out:
F8
- Step Over:
Working with the Interface
- Toggling Panels
- Show/Hide Navigator:
Command (⌘) + 0
- Show/Hide Debug Area:
Shift + Command (⌘) + Y
- Show/Hide Utilities Panel:
Option (⌥) + Command (⌘) + 0
- Show/Hide Navigator:
- Editor Modes
- Standard Editor:
Command (⌘) + Return
- Assistant Editor:
Option (⌥) + Command (⌘) + Return
- Version Editor:
Control (⌃) + Command (⌘) + Return
- Standard Editor:
Productivity Tips and Tricks
- Quickly Creating New Files
- New File:
Command (⌘) + N
- New File:
- Searching Symbols in a File
- Symbol Search:
Control (⌃) + 6
- Symbol Search:
- Bookmarking Lines of Code
- Add Bookmark:
Command (⌘) + ‼
- Add Bookmark:
- Editing and Moving Lines of Code
- Move Line Up/Down:
Option (⌥) + Shift + ↑/↓
- Move Line Up/Down:
- Deleting Words
- Delete Word Backward:
Option (⌥) + Delete
- Delete Word Backward:
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