1. Rename

Double-click the variable or function you want to change and hold down command + Control + E to enter rename mode, followed by a blast.

This method is only valid for this file and cannot modify the entire project.

2. Edit multiple lines at once

Press and hold the Opeion key, and drag the mouse up and down. When the multi-line cursor flashes, it indicates that you have entered the editing state. Click the up, down, left and right arrows on the keyboard to control the cursor position, and then edit like a tiger.

3. Run the last unit test

⌃ Control + ⌥ Option + ⌘ Command + G these four shortcuts will allow you to run the unit test that you just ran last time.

4. Quickly switch over running devices

Control + option + command +] The last running device, control + Option + Command + [the next running device. (Thank you for the recommendation of friends in iOS Swift development group. Please pay attention to LetCoding public account and click the bottom menu [Add Group] to add group).

5. Open or hide the right Inspector

option+ command + 0

6. Add comments to functions and variables

Move the cursor over the function or variable declaration while holding down the Command + Option +/ key.

7. Skip the popbox direct source code

In the latest version of Xcode, to jump to a function or variable declaration, you need to move the cursor to use, then click the Command key to highlight the function name, then click the left mouse button to bring up the following selection box, and then press enter to jump to the source.

A shortcut to jump directly to the source is control+ Command and click the left mouse button.


What else do you know about the unknown shortcut keys, please leave a comment.

More exciting articles are sent to my public account: Le Coding at the first time, welcome to scan code attention.