I. Common documents in the project**The xxxxtest folder is used for unit testing. **Products Catalog. *under the MAC program, the executable app that you produce is stored in that directory. *iOS program when IPA. This directory is not very meaningful for iOS programs. 1. Info.plist (Global configuration file, very important, cannot be removed):* In the XCODE5 is"Project name-info.plist"It is important to represent the global configuration file for the project. In the old version of Xcode (and Xcode6.1), the file name is called Info.plist. **Note: Do not include the Info keyword in the plist file that you created. *Some of the configuration items in Info.plist:1> Bundle display name (called in xcode6.1"Bundle name"), which indicates the name that appears after the software is installed on the phone. * * When this name has been modified, click Product-Clean , and then uninstall the software from the emulator and run it again. 2>Bundle identifier, the app's unique identity. 3>The version number of the bundle version, each time the software is released. Each time the same software is uploaded to AppStore, the new version number must be greater than the old one, otherwise it cannot be uploaded. 4> Main Storyboard FileBaseName, which corresponds to the selected"Project"-" General"-"Deployment Info"-"Main Interface"settings in the. 5> SupportedInterfaceOrientations, identifies the direction that the device supports. The corresponding selection"Project"-" General"-"Deployment Info"-"Device Orientation". The iphone supports only three directions and does not support up/down rotation (ipad support). Portrait (vertical screen), Landscape left (horizontal), Landscape right (horizontal screen to starboard). 6> info.plist is an XML file, open it in Notepad and look at it.
2>PCH file
*problems encountered:1>header files for a class are used in many places throughout the project. 2> In many places throughout the project, using the same"Macro" 3>The NSLog () function was used in many places in the project, so I wanted to erase it all at once. *To resolve the above problem, you can use the PCH file (Prefix Header files). * PCH file is a header file (similar to *. h file). **Note: The PCH file features all other code files in the project without displaying the import of the PCH file, which is accessible by default (other files do not need to manually #import the file). /** Reference Code://Assume that there are multiple places in the entire project where the person class is used, you can #import "Person.h" in every place where the person class is used, or #import "Person.h" into the PCH file. */*main functions:1>You can put some common macro definitions. 2>The #import import of the public model class is written to the PCH file. 3> Custom NSLog (). For example:#defineStevezlog (...) NSLog (__va_args__) * * * encountered problems: In many places in the project used the NSLog () function, think about The children are all cleared away.
Code:
#ifdef DEBUG #define #else #define Stevezlog (...) #endif
supplement, program development stage is divided into: 1 . Debug phase, write code, error, need to use NSLog (). At the same time, the system will customize a macro called Debug during the debugging phase. 2 . Release phase, write code to generate an IPA and other compressed files, upload to AppStore, Installed on the user device, NSLog () is not required. The same will automatically delete macros called Debug. 3 To summarize, we can customize a nslog () as follows: #ifdef DEBUG #define Stevezlog (...) NSLog (__va_args__) #else #define Stevezlog (...) #endif
all OC-related macro definitions are written in:#ifdef__objc__#endifinside, because all the content written in this if only OC code can be used, when a new. c file is not available in the project (without using the error), otherwise if written in the outside, create a new. C program can also be used, the error. For example, there is no in C language#import, only # include <xx.h>//determine if the OC file introduces these macros, if it is a normal C language file is not introduced. Otherwise, when you add the C language file in the project, The Times is wrong. #ifdef__objc__#defineABC 10#import "Person.h" #ifdefDEBUG#defineStevezlog (...) NSLog (__va_args__)#else #defineStevezlog (...)#endif #endif*/
Special attention:
*in xcode6.1, the PCH file is not created by default. **need to create a new* * Creation Method: Select"Supporting Files"Right-click"New File"-" Other"-"PCH File"-"prefixheader.pch". *The following macros are defined in the file:**#defineABC 10 * Selected items, Build Setting, search"prefix head"-Modify the contents of the prefix header as:**"$ (srcroot)/$ (product_name)/prefixheader.pch"**or**"$ (srcroot)/corresponding folder name/prefixheader.pch"* * Reference connection: http://www.cnblogs.com/YouXianMing/p/3989155.h
Common UI Advanced Files