[Object-C Basics] Object-C basics 5: common functions of xcode in project development

Source: Internet
Author: User

1. Menu Bar

There are files, edits, views, navigation, editors, products, windows, and help columns respectively.

Let's talk about the most commonly used menu bar.

(1) Create and open a file

(2) clear memory

During project development, after multiple compilation times, xcode is often stuck or changed on its own.CodeIf there is still no change in the simulator, you can select clean in the product to clear the memory.

At the end of the project's basic functions, we generally need to handle the memory leakage. We can use the analyze in the product to handle it. For example:

In a project I am working on, analyze it through analyze in the product, click the possible leakage on the left, and re-compile and run it after release to check whether exceptions may occur, note that not all warnings on the left side of xcode are caused by memory leaks, but some are not caused by memory leaks, if you release it, your project may crash. Therefore, it is best to solve the memory leakage problem one by one.

(3) debug mode

You can click the breakpoint on the left of the Code:

Then run the command + R command and perform one-step debugging through F6, F7, and F8. This is useful when we cannot find any problems at the moment.

(4) compile the project

You can select build to compile the project, or use the shortcut key command + R to compile the project. It is best to summarize the commonly used shortcut keys.

(5) project management (example: SVN)

Select the organizer in the window. For example:

Select the second repositories. Then there is a plus sign in the lower-left corner. Click the plus sign, add repository, and then the following will appear:

You can enter your desired project name for the name shown below, the svn address for location, and subversion for type. Then you can enter NEXT, for example:

You can leave it empty, and then click Add.

Then, the user name and password that you want to fill in SVN will pop up, as shown below:

After login, the following error occurs:

We can download a copy through the following checkout. In this way, you can use SVN for project management.

(6) change the compiler version.

Sometimes we may need to compile the IPA of a lower version or use a simulator of a lower version to determine what the project is like in a specific version. You can click a project. As follows:

There is a deployment target in summary. You can set the environment you want to compile and select the version supported by your SDK. Then select scheme as follows:

(7) Call the Console

On the right side of the page, you can select one in the middle to call up the console, the first to call up project file management, and the right to call up the property bar.

2. Common xcode shortcuts

(1 ).File

CMD + N: New File
CMD + Shift + N: new project
CMD + O: Open
CMD + S: Save
CMD + Shift + S: Save
CMD + W: Close the window
CMD + Shift + W: Close the file

(2 ).Edit

CMD + [: Left indent
CMD +]: Right indent

CMD + D: Add bookmarks
CMD +/: comment or cancel the comment

(3 ).Debugging

CMD + \: set or cancel a breakpoint
CMD + opt + \: Allows or disables the current breakpoint
CMD + opt + B: View All Breakpoints

CMD + return: Compile and run (determine whether to enable breakpoint Based on settings)
CMD + R: Compile and run (do not trigger breakpoint)
CMD + Y: Compile and debug (trigger breakpoint)
CMD + Shift + return: stops running or debugging

CMD + B: Compile
CMD + Shift + K: Clear

(4 ).Form

CMD + Shift + B: compilation window
CMD + Shift + Y: debugging code window
CMD + Shift + R: Debugging Console
CMD + Shift + E: Adjust the main editing window

 

These are common shortcut keys. You can refer to Baidu for details, but you only need to know what is commonly used in project development. You don't have to remember that much.

 

Summary: summarizes some of the functions commonly used in xcode in project development, rather than a comprehensive introduction to xcode. You can get familiar with xcode quickly after a long time.

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.