IOS development UI-Introduction to common project files and ios development ui Projects

Source: Internet
Author: User

IOS development UI-Introduction to common project files and ios development ui Projects

Today, I suddenly thought of this knowledge point. Save it and I will understand it before.

I. project file structure

 

Ii. Document Introduction

1. products Folder: it is mainly used to develop executable files for mac computers. This file is not available for ios development. the frameworks folder is mainly used to put the dependent framework 3. the test folder is used for unit testing. common folders (project name folder) (1) XXXinfo. plist file (01 in this project-common file-Info. plist) 1) Simple DescriptionIs 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 first, and then clear the project because the program has a cache.) bundle identifer: Unique Identifier (uniquely identifies an application. To ensure the uniqueness of the program, (The domain name is usually written in reverse mode) Bundle versions string, short, and bundle versions are both used to indicate the application version. The previous version is the official version, and the later version is 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 the main storyboard has two ways to modify the plist configuration file: The first way 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 of rotation supported by the application. In four directions, vertical-cannot be reversed-left-right (only up to three directions are supported) B. plist files are xml files after they are opened. Like a dictionary, data is stored in the form of key-value pairs. In the xml file, add the CF Prefix (2) pch file (01 in this project-common file-Prefix. pch) 1) it simply indicates that 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. In the future, we can define this macro in this file and do not need to import header files. 2) application scenarios: 1. Define some global macros. 2. import some 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) when developing a custom NSlog, You can first open the pch file to see if there is any custom NSlog in the company.
1 // _ OBJC _ macro, in all. m and. by default, the macro 2 # ifdef _ OBJC _ 3 is defined in the mm file. // if the global header file or macro only needs to be in. m or. mm file. 4 // 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 _) 10 # else11 # define NJLog (...) 12 # endif13 14 # endif

Note :... Receives variable parameters.

Supplement: _ OBJC _ the macro, in all. m and. mm files contain this macro by default. By default, the following two Conditional compilation statements are compiled. If this macro exists, the following statements are compiled.

# 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 in the Conditional compilation (note # endif) infoplist. strings file, which is related to the localization of the info. plist file.
Make a little progress every day ....

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

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.