Practical functions of xcode

Source: Internet
Author: User
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

  1. # Pragma mark-
  2. // Initialization code
  3. # 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

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.