SoFunction
Updated on 2025-04-03

A complete collection of shortcut keys in IOS Xcode

There are many shortcut key settings in Xcode that can make your programming work more efficient, and are extremely effective for quickly navigating, locating bugs and adding new application features in code files.

Of course, the purpose of you poking into this article is to quickly operate the code files, or to make Xcode panels more suitable for the screen of your notebook.

Among all Xcode shortcut keys, the following are the first things you should learn. After you learn how to use it, you may never be able to do without them.

Common shortcut keys in Xcode

New project     com + shift +N

Create a new file    com  + N

Preferences General com + ,

Skip to the specified line com + L

Add breakpoints to the current line    com + \

Mobile editing area at the top   com +

The bottom of the mobile editing area   com +  down

Move the leftmost line where the cursor is located  com +   Left

Move the cursor to the far right com +   Right

Skip a word forward/back option + left & right

Delete a word forward option + delete

Delete all characters after the line where the cursor is located control + K

Switch between open files com + option + left & right

Switch between .h .m of the current file   com + control  + Up & Down

Code typography control + i    or com + X and com + V

Select the current line com + shift + left & right

Uncheck Left & Right

Select the local variable in the current scope   com +control + E

Navigation area switching com +1,….8

Component area switching com + option + 1…5

Close or open the navigation area on the left com + 0

Close or open the component property area on the right com + option + 0

DeBug area view Open and close com + shift + Y

Clean up console com  + K

Open the console window com + shift + C

Global activation or disable breakpoints   com + Y

Xcode full screen   com + control + F

Running the program com + R

Stop the program com +.

Compile program com  + B

Static Analysis com + shift + B

Open the standard editor com + Enter (enter)

Open the Assistant Editing Area   com + option + Enter (enter)

Enter the version editor view com + option + shift + Enter

Keyboard instructions (win keyboard)

control = Ctrl

command = Alt

option = win key

shift = shift

shortcut key

1.  esc

2. command + /                                                                                                                            �

3. control + command + up/down arrows Quickly switch between header file (.h) and implementation file (.m)

4. command + b                                                            �

5. command + r compile and run the program

6. command + shift + b          Analyze the code and find potential memory overflow problems

7.  command  + Click           Jump to Statement

8. option + Click to display help information in the pop-up layer

9.  option + command + left/right arrow keys, collapse/open the current method

10. control + command + f               Xcode full screen, supported on Lion

11. command + shit + y

12. control + k

13. control + command + left/right arrow keys to switch in the upper/next file of history

14. tab            Accept the current autocomplete

15. Double-click the bracket or brace to select the corresponding enclosing statement block

16. command - shift - o: Quick search to open files

17. Control and key 1/2/3/4/5/6: You can quickly open related files/classes or codes. I often use control+1 to display the opened files, control+6 to display variables or methods in the current class, and you can enter them to filter.

18. command cooperates with 1/2/3/4/5/6/7 to display the subview of each label in the left navigation, commandco+ 0 to turn on or off the left navigation

19. option + command cooperates with 1/2/3/4/5/6 to open each label view of the right property window in turn, especially when used in xib. Use option + command + 0 to close the right property window

20. command + shift + j Locate the currently opened file in the left navigation

21. command + return Switch to standard editor

22.  option + command + return Switch to the auxiliary editor, which can be compared with left and right, which is particularly convenient for dragging and linking when editing xib

23. command+shift+f                                                          �

24. f7                Step Into

25. f6               Step Over

26. f8                 Step Out

27. control + command + y: continue when debugging breakpoint

28. command + \ : Set/cancel breakpoint in the current line

29. command + y  Globally activate or disable all breakpoints

30. command+ left/right arrow keys Jump to the beginning/end of the line

31. option + left/right direction keys Jump a word forward/back

32. option + delete Delete a word forward

33. Ctrl + k deletes the so-called character after the line where the cursor is located;

The following are temporarily collected

control + .   :   Next automatic completion prompt

command + e   :   Find using the currently selected content

command + g   :   Find the next one in the current file

command- + shift + f   :   Find in the project

command + option + shift +t   :  Locate the currently edited file in Groups&Files

control+ a  :  The cursor jumps to the beginning of the line

control +e   :  The cursor jumps to the end of the line

command+ g   : Search down

command+shift+g  : Search upward

Thank you for reading, I hope it can help you. Thank you for your support for this site!