Xcode shortcut keys

Source: Internet
Author: User

1. Documents
1 cmd + N: New file 2 cmd + SHIFT + N: New Item 3 cmd + O: Open 4 cmd +
   
     S: Save 
    5 cmd + SHIFT +
     S: Save as 
    6 cmd +
     w: Close window 
    7 cmd + SHIFT + W: Close the text Thing
   
2. Editing
1CMD +[: Left Indent2CMD +]: Right indent3 4 5CMD + CTRL +Left : Folding6CMD + CTRL +Right : Cancel collapse7CMD + CTRL +TOP: Collapse All functions8CMD + CTRL +BOTTOM: Canceling all function folds9CTRL +U: Cancel all foldsTen  OneCMD +D: Add bookmarks ACMD +/: Commenting or canceling comments -  - TenCTRL +.: Parameter Hints the  OneESC: Auto Prompt list

3. Commissioning
1 cmd + \: Set or Cancel breakpoint 2 cmd + opt + \: Allow or disable current breakpoint 3 cmd + opt + B: View all Breakpoints  4  5 cmd + RETURN: Compile and run (determines whether breakpoints are enabled according to Settings)  6 CMD + R: Compile and run (without triggering breakpoints)  7 cmd + Y: Compile and debug (trigger breakpoint)  8 cmd + SHIFT + RETURN: Terminate run or debug 9 cmd +
     
       B: Compile 
       one-time CMD + SHIFT + K: Clean up
     

4. Form
1 cmd + SHIFT + B: Compile window 2 cmd + SHIFT + Y: Debug Code Window 3 CMD + SHIFT + R: Debug Console /c5>4 CMD + SHIFT + E: Main edit window Adjustment 50: Left tool box 670 : Right property box

5. Help
1CMD + OPT +?: Development Manuals2CMD + CTRL +?: Quick Help3 4CMD + OPTION +0: Document5  6 7Command + Shift +E: Extended editor8Command +[: Move code block left9Command +]: Move code block rightTen Tab: Accept Code hints One ESC: Show Code hints menu ACtrl +. (period): Loop through code hints -Shift + Ctrl +. (period): Reverse looping through code hints -Ctrl +/: Move to the next placeholder in the code hint theCommand + Ctrl +S: Create snapshot -Ctrl +F: Move the cursor forward -Ctrl +B: Move the cursor back -Ctrl +P: Move cursor to previous line +Ctrl +N: Move the cursor to the next line -Ctrl +A: Move the cursor to the beginning of the bank +Ctrl + E: Move the cursor to the end of our line--Yang over note: These two are too useful, just started with Xcode, has been strange why home and end keys can not be directly located to the beginning of the line, the end?  ACtrl +T: Swap the characters on the left and right side of the cursor atCtrl +D: Delete the character to the right of the cursor -Ctrl +K: Delete Bank -Ctrl +L: Place the insertion point in the center of the window -Command + Alt +D: Show open quickly window -Command + Alt +Up ARROW key: Open the companion file -Command +D: Add bookmarks inOption +Double-click: Search in the document -Command +Y: Run the program in debug mode toCommand + Alt +P: Continue (in debug) +Command + Alt +0: Skip -Command + Alt +I: Jumping in theCommand + Alt + T: Jump out

6.
1 1: command+shift+ part of the screen422: command+shift+ The entire screen33  3: Save to Pasteboard  command+control+shift+344:  command+shift+ Open Window 4 and press SPACEBAR 55  
14 frequently used shortcut keys in Xcode xcode navigation shortcut keys

1. Engineering Navigator: command+1

Quickly browse through code, pictures, and user interface files.

2. Show/Hide Navigator Panel: command+0

When you're on the screen you might want to hide irrelevant parts of the content you're interested in. This shortcut is useful if you want to use an auxiliary editor or if you want to design a user interface and connect it to your code.

3. Show/Hide Utility panel: command+option+0

The utility panel is used primarily for editing user interface files, and you can hide it when you only consider writing code.

4. Open the file in the Auxiliary editor: Select the file in the Project Navigator to perform the option+ left click operation.

A quick way to open the Assistant editor-just hold down the option key and click on the file you want to open to the right of the current edit box.

Xcode Search Shortcut keys

When you hit the code, suddenly want to add a function, or want to change what bug, of course, the quickest way is to use a search. Instead of scrolling through hundreds of lines of code, you can simply jump to a specific piece of code by using a lookup.

5. Search Navigator (find Navigator, i.e. search): command+shift+f

Use the project search to find the number of times a variable or method name has been mentioned. Can be matched against an instance, and the uppercase and lowercase letters can be ignored. You can also replace the name of the variable you are looking for.

6. File Jump bar: Control+6 (type method/variable name +enter jump)

Jumps to the line of code in the current code file. If you have thousands of lines of code in your file, you can use this shortcut to narrow your search to insert code where needed to add new functionality.

7. Quick open: Command + Shift + O

People who like to use the keyboard but do not like to use the mouse will love this shortcut, can jump directly to a method definition or the specified code file.

8. Jump bar and quick Open Search input shortcut keys

You can quickly switch to a file or find a specific line of code by typing the first letter. For example, in the Viewcontroller.swift file, press COMMAND + Shift + O, and then type VDL, and the first results are shown with

The function of the viewdidload () name.

Type the initial letter to search for more with less input.

9. In the program (written in objective-c or C + +). Fast switching between H and. m files: Control + Command + up Arrow

If you write programs in Objective-c and C + +, or use open source code written in other languages, you may need to look for existing code. You can use the control + Command + UP ARROW key combination operation in two

Quickly switch between related files, such as header files and implementation files in the objective-c. If you use Swift to write code, this is a bit inappropriate, because Swift uses a single code file.

Application compilation and cleanup

You have to run it before you can experience a new app, but sometimes Xcode doesn't work well to run your project, and you'll need to clear the items you can't run.

The following shortcuts help you to use the mouse as little as possible during code writing.

10. Run App:command + R

In the process of writing code, I usually use the shortcut from running the application. Test the application as much as possible so that you can find and fix bugs in your app early.

11. Clear Project: Command + Shift + K

Maybe there was a problem with Xcode running, or the app couldn't respond, or something unexpected happened, you'd first want to clean up the project and run it again. If that doesn't solve the problem, all right, turn off Xcode.

and re-open. If the application does not work, see if there are any error message prompts, you can play as the "Googler" advantage to get help. However, this practice is not easy too often, it will slow down the development of the program. It will remove all intermediate files, and it takes time to recreate the files.

Clear Xcode project when run fails

12. Build the application: Command + B

Checking the code to make sure it works is something you often have to do, and compiling an app project lets you determine whether it works before you write the next feature. Even if Xcode is checked shortly after the code has been written, it

Late, or give some inappropriate error hints. You don't have to run the application all the time, and if you just make some small changes, the build will help you do a quick check so you can return to the next line of code.

Compiling code to ensure that the application does not have any error issues

Documentation and help

Self-learning is important in learning, and for developers who have not browsed the Xcode documentation help, these shortcuts can help you look at the relevant code references to better understand the code provided by Apple to develop a more robust app.

13. Documentation and references: Command + Shift + 0 (Zero)

Use Xcode to install documents in the background and support offline search, ideal for working out. Open the document and reference, and type a keyword in the code, and the Xcode document also provides some additional resources and sample engineering.

Learn how to use code with the Documentation and reference guide

14. Quick Help: Perform the OPTION + Left-click operation on the class or method name

Inline help can help developers quickly learn how to use a class or code snippet. Perform the OPTION + left-click operation on a variable, class, or method name to get more detail information. If you click on the reference link at the bottom of the pop-up view, you can easily jump to the documentation provided by Xcode. You can also perform a option+ double-click name operation on a variable, class, or method name to make it easier to jump to the document.

Get quick help writing code

Other shortcut keys:

CMD +. Conveniently pauses the iOS emulator

(Description: The above shortcut keys from the network, collected and collated by myself, as a personal learning use, infringement deleted)

Xcode shortcut keys

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.