New users of Xcode

Source: Internet
Author: User

XcodeFor beginners, you must refer to the content described in this article. If you are a newbie, this article will guide you to learn. Let's not talk about it. Let's take a look at the details.

View or modify Xcode Environment Settings

You can set the status of your own programming environment, but you have to shut down all open projects before setting.

1. (menu item) Xcode-> Preferences or command +,

2. You can select all projects to set them.

For example, the General tab has a programming interface setting option:

Layout: All-in-One: All tasks to be executed are concentrated in One window.

Condensed: tasks executed are distributed in different windows.

Default: the above two integrations

View class models

You can use the menu function to generate a structure of the selected class and the relationship between classes:

Select the class to viewFile-> Design-> Class Model-> Quick Model

Add file comment

Of course, you canFileAdd <//> to comment. The comment here is anyFileMedium

Select the File to be annotated-> File-> Get Info or command + I-> Comments, and add Comments to it.

Fast File Truncation

View-> Layout-> Show Favorites Bar

Drag the file to be created in the fast-cut mode into the box.

When the corresponding fast cut method is deleted, just drag the selected one out.

Debugging

Add BreakPoint: Click the column on the left of the corresponding code line, click the left button or right-click to Add BreakPoint

Debugging: Build-> Build and Debug or command + Y-> the Debugger window appears. If not, Run-> Debugger can be used ),

You can view the relevant information at the breakpoint-> click Continue to Continue running (Deactivate can not be stopped in the future)

Remove BreakPoint: select the BreakPoint-> right-click the BreakPoint or press the left-> Remove BreakPoint

Run

Build-> Build :( command + B) Compile + Connect + create the target application, but do not execute to generate the application using the current project)

Build-> Build and Go :( command + enter) execute the application and stop at the first breakpoint.

Build-> Build and Debug :( command + Y) Generate and release the application, and open the debugger

Build-> Build and Run :( command + R) Generate and execute the application

Build-> Clean :( command + Shift + K) Clear the current project

The execution result is displayed in the project folder> build> Finder. You can double-click it to execute

Help

To view the complete Xcoder documentation, go to Help-> Xcode Workspace Guide or command +?

You can also find

Change company name

There is no visual interface, but you can use Terminal to replace the following companyNAME in Terminal.

 
 
  1. defaults write com.apple.Xcode PBXCustomTemplateMacroDefinitions'{"ORGANIZATIONNAME"="companyNAME";}' 

Code layout management

Right-click control + left-click and select Re-indent selection. XCode reorganizes the format of the selected content.

Command + [move left

Command +] Right Shift

You can press esc to view the prompt at any location

Automatically prompt control +/jump to the next position

Control + F move the right arrow to the right)

Control + B move the left arrow to the left)

Control + P move to the top arrow of the previous line)

Control + N move to the next row and down arrow)

Control + A move to the beginning of the line command + left arrow)

Control + E move to the end of the line command + right arrow)

Control + T transpose the symbols on both sides of the cursor

Control + D Delete characters on the right of the cursor

Control + K Delete the code behind the cursor in the row where the cursor is located

Control + L place the insert point in the center of the window

Option + double-click to search for the selected content in the document

Xcode platform Introduction

In Groups & Files, select the category area and enter a word in the search bar in the upper right corner to list all the Files in the selected area that contain the words to be queried.

File-> Open Quicklycommand + shift + D) Open the window for searching

Edit> Add to BookMarkscommand + D) insert bookmarks at the cursor position

Navigation bar in the main form

The first one indicates the current file. Click to expand all open files.

The second shows the position of the current cursor. Click to expand all methods of the current file.

The third sign is similar to a book. It displays all the bookmarks in the current file. It is the same as the bookmarks icon in groups & files.

All Breakpoints in the Next display file

The next menu marked with C allows you to view the hierarchy results of the class where the current cursor is located

Next menu marked with #, you can view the file containing calls) relationship

The next two overlapping blocks can open the suite file of the current file.

The next small lock icon can set the file to read-only

The split button is at the bottom of the lock icon. You can click to split the source code window into two parts and press the option key to perform Vertical Split.

Debugging

Run-> Run (Command + R)

Run-> Go, Run-> Debug (Command + Y)

Command + Z + P continue in the debugger)

Command + Z + O skip

Command + Z + I jump

Command + Z + T jump out

In the debugging window

The first button indicates that the pause state of all breakpoints is quickly converted.

The second indicates the next breakpoint.

The third indicates skipping a vertex or method.

The fourth method indicates the method currently executed.

The fifth method indicates that the current execution method exists.

The sixth one indicates all the current breakpoint information.

The last one indicates opening the DEBUG command window

Summary:XcodeThis article is helpful to you.

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.