IOS development UI Chapter 15-common files in the project, ui15-

Source: Internet
Author: User

IOS development UI Chapter 15-common files in the project, ui15-

IOS development UI-Introduction to common project files

I. project file structure

Ii. Document Introduction

1. products Folder: it is mainly used for executable files developed on mac computers. This file is unavailable for ios development.

2. The frameworks folder is mainly used to place the dependent framework.

3. The test folder is used for unit testing.

4. Common folders (project name folder)

(1) XXXinfo. plist file (01 in this project-common file-Info. plist)

1) Simple Description

Is a configuration file, which is very important for some runtime configuration of the project and cannot be deleted.

In the project created in the old version of xcode, the configuration file name is info. plist.

Note: when loading the plist file prepared by yourself, do not name it with info.

 

2) attributes of the configuration file:

Bundle display name:

Application display name. If you want to modify the name of the file displayed on the desktop, you only need to modify it here. (Delete the original program and clear the project because the program has a cache)

Bundle identifer:

Unique Identifier (a unique identifier identifies an application. To ensure the uniqueness of the application, the domain name is usually written in reverse)

Bundle versions string, short, and bundle versions

Both are used to represent the application version. The previous version is the official version, followed by the internal version, that is, the internal development version of the company. Note: When uploading an app, the updated version must be later than the previous version.

Main storyboard file base name

Primary storyboard

 

There are two ways to modify the plist configuration file:

The first method is to modify the configuration information on the interface.

In the second way, you can directly click the project and set it on the visual interface.

Note:

A. Orientation supported by the application. Four Directions, vertical-not reversed-left-right (up to three directions are supported)

B. After the plist file is opened, it is an xml file. Like a dictionary, data is stored in the form of key-value pairs. The CF prefix is added to the xml file.

 

(2) pch file (01 in this project-common file-Prefix. pch)

1) Simple Description

The saved content can be shared by all other original files in the project.

Generally, you need to add import header files to process macro files. You can define this macro in this file later and do not need to import header files.

 

2) application scenarios:

1. Used to define some global macros,

2. It is used to import header files that can be used globally.

3. Using a custom NSlog consumes a lot of resources. (Almost the most expensive), all the prints should be removed during the release.

(Supplement: there are two stages in development.

First, we need to print the log debugging program in the Development and debugging phase. If the program is in the debugging phase, the system will define a macro named DEBUG for us.

The second is the release phase: log does not need to be printed, because log occupies a lot of resources and the user does not understand the log. If the program processes the release phase, this macro will be removed.

Should all nslogs be commented out one by one during the release? Then, when developing the second and third editions, should all the annotated nslogs be opened?

To solve this problem, you can customize NSlog in the. pch file .)

 

3) custom NSlog

During development, you can open the pch file to see if there is any custom NSlog in the company.

/*********** _ OBJC__BEGIN ************/

//All content in it can only be used. MFile or. Mm

 

The role of a pch file:

1. Store some global macros (macros used throughout the project)

2. Used to include all header files (header files used throughout the project)

3. The log output function can be enabled or disabled automatically.

*/

 

/**

The role of a pch file:

1. Store some global macros (macros used throughout the project)

2. Used to include all header files (header files used throughout the project)

3. The log output function can be enabled or disabled automatically.

 

Note :... Receives variable parameters.

Supplement:

_ OBJC _ this macro is included in all. m and. mm files by default. The following two sentences will be compiled by default.

Conditional compilation statement. If this macro exists, compile the following statement.

# Import <UIKit/UIKit. h>

# Import <Foundation/Foundation. h>

If you only need to use this global header file or macro in the. m or. mm file, please write this file or macro to # ifdef_ODBC.

Note: It is recommended to write it in Conditional compilation (note # endif)

 

The infoplist. strings file is related to the localization of the info. plist file.


For IOS development UI, give the title

You go to the resource area in the BBS of cocoachina, where the materials are available from development to design.

At present, I am just learning oc. It can be said that the ios developer is the one who is half-hanging. Next, when I learn the UI later, the content of oc is the most commonly used.

I suggest you take a look at the UI of the infinitely interconnected ios video. Soon I knew how to get started. Don't just look at OC syntax or something. Search in Baidu video should be able to find.

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.