Common files in the iOS Development UI Chapter 15-Project

Source: Internet
Author: User
Tags uikit

IOS Development UI article - Introduction to common project documents

I. Structure of the project document

Ii. Introduction of documents

1.products Catalogue : mainly used for mac a computer-developed executable file. iOS Development does not use this file

2.frameworks directories are primarily used to put dependencies on the framework

3.test the catalogue is used for unit testing.

4. frequently used directory ( project name directory )

( 1 ) xxxinfo.plist file (in this project, the 01- Common Files -info.plist )

1 ) Simple Description

is a configuration file. It is important that the file be configured with some execution time for project. cannot be deleted.

in the old version number Xcode in project creation, the name of this configuration file is called Info.plist .

Note: So in loading your own prepared plist file, do not use the Info name.

2 description of the properties of the configuration file:

watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvdtaxmdkynzmxmq==/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/center ">

Bundledisplay Name:

The application display name.

Suppose you want to change the file name displayed on the desktop, just change it here.

(You need to delete the original program first and then clear project, because the program has a cache)

Bundleidentifer:

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 the bundleversions

Two are used to indicate the version number of the application. The previous version number is the official version number, followed by the build number. That is, the internal development of the company version number. Request Prompt : when uploading the app. The version number of the later update must be larger than the previous version number.

Mainstoryboard File Base Name

The most basic Storyboard

There are two ways of changing plist configuration file:

The first way is to change the configuration information in the interface you see.

Another way to directly click Project is to be able to set it through a visual interface.

Additional notes:

A. the rotation direction that the application supports.

Four directions. Vertical - not supported upside down - left - right (up to three directions only)

b.plist after the file is opened XML file. The same as the dictionary. is to save the data in the form of a key-value pair. In the XML file. Added CF prefix

(2)pch file ( 01- common file in this project -prefix.pch )

1 ) Simple Description

The saved content can be shared by all other original files in the project.

usually the macro file processing, need to join Import Import the header file. You can define this macro in this file later. No longer need to import header files

2 ) Application Scenario:

1. used to define some global macros.

2. used to import some global can use the header file.

3. used to define NSlog, very resource-intensive. (almost the most consumed). At the time of publication, all the prints are to be removed.

(Supplement: in Development.) is divided into two stages.

first, the development of debugging phase, need to print Log Debug the program. Suppose the program is in the debugging phase. The system will define a macro for us named DEBUG .

second, the release phase: no need to print Log , since Log very resource-intensive, and users can not understand Log , assuming the program processes the disclosure phase, this macro is removed.

is it time to make a NSlog all staring down ?

then in the development of the second edition. The third edition of the time, but also all the staring off the NSlog are open?

for this problem. defining the NSlog yourself in the . pch file can be a very good solution.

3 ) Define yourself NSlog

can be opened in the development of the first PCH document to see if the company has its own definition NSlog .

#import <Availability.h>

#ifndef __IPHONE_5_0

#warning "This project Usesfeatures only available in IOS SDK 5.0 and later."

#endif

/************__objc__begin************/

The entire contents of the inside can only be used in. m files or. mm

#ifdef __objc__

#import <UIKit/UIKit.h>

#import <Foundation/Foundation.h>

#import "TXPerson.h"

#ifdef DEBUG //Commissioning Phase

#define TXLOG (...) NSLog (__va_args__)

#else //Announcement Phase

#define TXLOG (...)

#endif

#define ABC Ten

#endif

/************__objc__end************/

/**

* All the things outside, the whole project is shared

*/

#define Name Ten

/**

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. Ability to open or close the log output on your own initiative

*/

Description: ... To receive a variable number of parameters

Add:

_objc_ this macro, in all the . M and the . MM in the file , includes this macro by default, the following two sentences are compiled by default

Conditional compilation statement, if you have this macro, compile the following statement.

#import <UIKit/UIKit.h>

#import <Foundation/Foundation.h>

assume this global header file or macro. Only use in . M or . mm files, please write the file or macro in #ifdef_ODBC_ .

watch out. : It is recommended to write in conditional compilation (note #endif )

infoplist.strings the file. related to localization of info.plist files

Common files in the iOS Development UI Chapter 15-Project

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.