Xcode the IOS Project: Introduction to the project documentation (the role of each document in the project) __ios

Source: Internet
Author: User
Tags documentation uikit

Transfer from: http://www.cnblogs.com/wendingding/p/3766347.html top


iOS Development UI article-common project documentation Introduction

I. Schematic diagram of project document structure

Second, File introduction 1.products folder: Mainly for the development of Mac computer executable files, iOS development can not use this file 2.frameworks folder is mainly used to put the dependent Framework 3.test folder is used to do unit Test 4. Common folders (project name folder) (1) xxxinfo.plist file (01 in this project-common file-info.plist)1) Simple descriptionIs the configuration file, the file on the project to do some run-time configuration, very important, can not be deleted. In a project created by an older version of Xcode, the name of this configuration file is called Info.plist. Note: Therefore, do not name info when loading the plist file you have prepared.2 Description of the properties of the configuration file: Bundle Display Name: The application displays names. If you want to modify the name of the file displayed on your desktop, just modify it here. (You need to remove the original program, and then clear the project, because the program has a cache) bundle Identifer: Unique identifier (uniquely identifies an application, in order to guarantee the uniqueness of the program, usually write the domain name backwards) bundle versions string, Short and bundle versions   Two are all used to represent the version of the application, the previous version is a formal version, followed by the internal version, that is, the internal development of the company version. Request hint: When uploading the app, the later version must be larger than the previous version. Main Storyboard file base name Storyboard   There are two ways to modify the Plist profile: The first way is to modify the configuration information as shown in the diagram.    The second way to directly click the project, can be set through the visual interface. Supplemental Note: A. The direction of rotation supported by the application. Four orientations, vertical-not supported upside down-left-right (up to three orientations only) B.plist file is an XML file when opened. As with dictionaries, data is stored in the form of key-value pairs. In the XML file, adding the CF prefix     (2) PCH file ( 01-common file-prefix.pch) 1 in the project) simply shows that the saved content can be shared by all other original files in the project. In general, the macro file processing, you need to add import imports header file. You can later define this macro in this file, no longer need to import header files   2 scenario: 1. Macros used to define some global, 2. Used to import some header files that can be used globally. 3. The use of nslog from the definition is very resource consuming. (almost the most consumed), to remove all printing when it is released. (Supplement: In development, it is divided into two stages.) First, the development of debugging phase, the need to print log debugger, if the program is in the debugging phase, the system will define a name for us, called Debug macros. The second is the release phase: Do not need to print log, because log is very resource-intensive, and users can not read log, if the program to process the release phase, will remove the macro. Would you like to comment out the nslog at the time of release? And then when you develop the second edition, the third edition, you have to open all the annotated nslog. For this problem, customizing the NSLog in the. pch file can be a good solution. )    3) custom NSLog at the time of developmentYou can open the PCH file first to see if there are any custom NSLog in the company.

1//__OBJC__ This macro, this macro is defined by default in all. m and. mm Files
 2 #ifdef __objc__
 3///If this global header file or macro only needs to be used in the. m or. mm file,
 4// Please write the header file or macro to #ifdef __objc__
 5     #import <UIKit/UIKit.h>
 6     #import <foundation/foundation.h >
 7 
 8 #ifdef DEBUG
 9 #define NJLOG (...) NSLog (__va_args__)
#else
#define NJLOG (...)
#endif 
#endif

Description: ... Refers to receiving the variable parameter supplement: _OBJC_ this macro, in all the. m and. mm files, default to include the macro, the default will compile the following two conditional compilation statements, if there is this macro, compile the following statement.

#import <UIKit/UIKit.h>

#import <Foundation/Foundation.h> If this global header file or macro only needs to be used in the. m or. mm file, write the file or macro to #ifdef_odbc_. Note: It is suggested that the file written in the conditional compilation (note #endif) infoplist.strings be related to localization of the Info.plist file

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.