iOS Development UI Article-common project file Introduction

Source: Internet
Author: User
Tags uikit

iOS Development UI Article-common project file Introduction

I. Structure of the project document

Ii. Introduction of documents

1.products folder: Mainly used for Mac computer development executable file, iOS development not to use this file 2.frameworks folder mainly used to put the framework 3.test folder is used to do unit Testing 4. Common folders (project name folder) (1) xxxinfo.plist file (01 in the project-common file-info.plist) 1) Brief descriptionIs 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: Application display names. If you want to modify the file name displayed on your desktop, just modify it here. (You need to delete 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 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, followed by the internal version, that is, the company developed in-House version. Note: When uploading an app, the later version must be larger than the previous version. Main Storyboard file base name The main storyboard  there are two ways to modify plist configuration files: 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-to-right (up to three directions only) B.plist file is opened after the XML file. As with dictionaries, data is saved in the form of key-value pairs. In the XML file, a CF prefix    (2) PCH file (in the project for  01-common file-prefix.pch) is added, 1) A simple description of what is saved 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 header files that can be used globally. 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.
1//__OBJC__ 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. m or. mm files, 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 NJL OG (...) NSLog (__va_args__) #else11 #define NJLOG (...) #endif13 #endif

Description: ... means to receive mutable parameters

Add: _OBJC_ This macro, in all the. m and. mm files, contains the macro by default, the following two conditional compilation statements are compiled by default, 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 the conditional compilation (note #endif) infoplist.strings file, with Info.plist file localization related

iOS Development UI Article-common project file Introduction

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.