iOS Development UI Article-common project file Introduction
I. Structure of the project document
Ii. Introduction of documents
1.products folders: Mainly for Mac computer development executable files, iOS development does not use this file
2.frameworks folders are primarily used to put dependent frameworks
The 3.test folder is used for unit testing.
4. Common folders (project name folder)
(1) xxxinfo.plist file (01 in the project-common file-info.plist)
1) Brief description
Is the configuration file, the file for the project to do some run-time configuration, very important, cannot be deleted.
In the project created by the older version of Xcode, the name of this configuration file is called Info.plist.
Note: Do not name info when loading your plist files.
2) Description of the properties of the configuration file:
Bundle Display Name:
The application display name. If you want to modify the file name displayed on your desktop, just modify it here. (You need to delete the original program first and then clear the project, because the program has a cache)
Bundle Identifer:
Unique identifier (uniquely identifies an application, in order to ensure the uniqueness of the program, usually the domain name upside down)
Bundle versions string, short and bundle versions
Two are used to represent the version of the application, the previous version is the official version, and the later is the build, which is the internal version developed by the company. Note: When uploading an app, the later version must be larger than the previous version.
Main Storyboard File base name
The most important storyboard
There are two ways to modify the plist configuration file:
The first way is to modify the configuration information in the interface.
The second way to directly click on the project, can be set through the visual interface.
Additional notes:
A. The direction of rotation supported by the application. Four directions, vertical-not supported upside down-left-right (up to three directions only)
After the B.plist file is opened, it is an XML file. As with dictionaries, data is saved in the form of key-value pairs. In the XML file, a CF prefix has been added
(2) PCH file (01-common file-prefix.pch in this project)
1) Brief description
The saved content can be shared by all other original files in the project.
Typically the macro file is processed and you need to add the import header file. You can later define this macro in this file, no longer need to import the header file
2) Application Scenario:
1. Used to define some global macros,
2. Used to import some global can use the header file.
3. Use to customize the NSLog, it consumes resources. (almost the most consumed), remove all prints at the time of release.
(Supplement: In development, it is divided into two stages.)
First, the development of debugging phase, the need to print the log debugger, if the program is in the debugging phase, the system will define for us a name called Debug macro.
The second is the release phase: Do not need to print log, because log is very resource-intensive, and users can not understand the log, if the program processing the release phase, the macro will be removed.
Are you going to have to comment out all the nslog at the time of the release? And then in the second edition, the third version of the time, but also all the commented out of the NSLog are open?
For this problem, customizing the NSLog in the. pch file can be a good solution. )
3) Custom NSLog
When doing development, you can open the PCH file to see if there are any custom NSLog in the company.
/************__objc__begin************/
// all the content in it is only used . M in the file or . MM
PCH file is useful:
1. Store some global macros (macros that are used throughout the project)
2. Used to include all header files (header files that are used throughout the project)
3. Can automatically turn on or off the log output function
*/
/**
PCH file is useful:
1. Store some global macros (macros that are used throughout the project)
2. Used to include all header files (header files that are used throughout the project)
3. Can automatically turn on or off the log output function
Description: ... means to receive mutable parameters
Add:
_OBJC_ This macro, which is included by default in all. m and. mm files, compiles the following two sentences by default
Conditional compilation statement, and if you have this macro, compile the following statement.
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
If this global header file or macro is only required to be used in. m or. mm files, write the file or macro in #ifdef_odbc_.
Note: It is recommended to write in conditional compilation (note #endif).
Infoplist.strings file, associated with localization of info.plist file
Common files in the iOS Development UI Chapter 15-Project