Record the practical functions of xcode.
1. Automatic Code Completion: During xcode coding, many people think that the code prompt function is not easy to use, the prompt is not intelligent enough, and the prompt list cannot be displayed. In fact, xcode has an automatic Code Completion function. When coding, Press ESC to display the automatic prompt list. The color box of the name in the list represents the type of this symbol: E represents enumeration, f Represents a function, # represents # define instruction, m represents a method, and C represents a class.
2. after the Automatic completion of the Code, when a parameter is required for the automatically completed code, the parameter displays a placeholder, And you can press control +/to move the cursor to the next placeholder for editing.
3. First line indent: use command + [and command +] to shift the selected code left and right.
3. Code navigation: the Emacs shortcut is valid in any cocoa text domain, not only xcode, but also the URL address bar and text domain of textedit and Safari, pages and keynote text fields:
Control + F: Forward to the right (forward) (same as the right arrow)
Control + B: move back to the left (backward) (same as the left arrow)
Control + P: Move to the top (previous) line (same as the arrow above)
Control + N: Move to the next row (same as the down arrow)
Control + A: Move to the beginning of the line (same as command + left arrow)
Control + E: Move to the end of a row (end, same as command + right arrow)
Control + T: transpose (transpose) symbol on both sides of the cursor
Control + D: Delete the character on the right of the cursor
Control + K: delete (kill) the code behind the cursor in the row of the cursor
Control + L: place the cursor in the center of the window. (This is very useful)
4. bookmarks: select the text area or insertion point, select edit-> Add to bookmarks, or press the command + D button to enter the bookmarks in the prompt box. You can view bookmarks in the Group & files pane.
5. # progma1.When the amount of Code increases, you can use the # progma mark command to group code blocks (Object-C). As follows,
Insert a program block into the initialization code
[CPP]View plaincopy
- # Pragma mark-
- // Initialization code
- # Pragma mark Initialization
# Progma mark is the IDE instruction sent to xcode, which has nothing to do with the compiler. They tell xcode editor that code should be separated from the function pop-up menu at the top of the editor pane, in this way, code navigation is very important and a strong logical grouping is formed.
From: http://blog.csdn.net/gavinming/article/details/6197481