Common Xcode shortcuts and xcode shortcuts

Source: Internet
Author: User

Common Xcode shortcuts and xcode shortcuts

Because mac is used for the first time, all the shortcut keys on mac are in the form of symbols, which cannot be remembered. The record is as follows. The correspondence between the symbol root keys on mac is shown in:

The Xcode Version I used is Version 6.1.1 (6A2008a)

1. breakpoint: command + \

2. Compile the program: command + B

3. Run the program: command + r

4. debug the program: Break the breakpoint first, and then the command + r will be broken directly at the breakpoint.

5. Stop running the program: Command +.

6. Switch header files and source files: control + command + up and down arrows

7. Left indent: command + [

8. Right indent: command +]

9. Forward: ctrl + command + left arrow

10. Move back: ctrl + command + right arrow

11. One-step execution: f6

Enter function: f7

Jump out function: f8

When I start to use it, pressing the f6 key does not work in a single step, but increases the brightness of the system's keyboard!

Go directly to system preference settings-> select the following options on the keyboard

In this way, fn + f6 is the system shortcut key, and f6 is the common application shortcut key. This rule applies to other f keys.

12. Automatic completion

For example, define a string NSString * ns = @ "123 ";

Press [ns, Press space, and the esc key, and the method list is displayed.

13. automatic matching of parentheses: double-click the symbol, and xcode will automatically display the Matching content.

14. Change the file name. For example, change a. h to B. h. Select a. h and press enter. enter the change and then press enter.

15. Automatic Code folding

To collapse the for loop, for example

For (int I = 0; I <argc; ++ I ){

NSLog (@ "arg % d: % s", I, argv [I]);

}

Directly move to the left sidebar on the left of.

Click the drop-down arrow or select the corresponding option from Editor> Code Folding.

16. how to open the file in the independent Tab, View-> Show tab Bar, but this function is too bad, click a file or display it in the current Tab, unlike Visual Studio, it is opened in a new tab.

I think this experience is terrible. Maybe I did not find it myself. Please tell me if you know it!

17. Help documentation

When writing code, we often view the description of a method. There are several methods in Xcode:

For example, to view the description of NSString

1) Click description and click in the window on the right to view the description.

The blue text indicates the link. Click the meeting to open the Xcode documentation for help .. Because the help documentation is online by default, you will find it slow. The following describes how to download the documentation to your local device.

2) move the cursor to description, and press and hold the option key to display. Click it to bring up the window.

The description in this section is not described in 1.

3) menu Help-> ention and API Reference, as mentioned above, because the Help is online by default, and is slow. Solution: download the document to your local device.

Choose XCode> Preference and download the corresponding document as follows:

However, the download speed is very slow.

4) directly go to the https://developer.apple.com to view, I strongly recommend this kind of, in the case of a network quickly and can see the latest api update instructions. Method 3 local documents may not be up-to-date.

 

Related Article

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.