Get ready to build a new app

Source: Internet
Author: User

Objective

It's messy, but I want to write it down and build a good project-pattern MVC,

Will include some third-party libraries, animation libraries, third-party library management associations, custom management and association of Common controls

1. Creation of precompiled files

In the build setting search prefix header will change the blank path inside

$ (srcroot)/xxxxxxxx (your project name)/prefixheader.pch

Where Prefixheader is the PCH file you created yourself

There are typically two frames added to the file:

#ifndef carloans_prefixheader_pch #define carloans_prefixheader_pch#ifdef  __objc__#import <UIKit/UIKit.h>#import <Foundation/Foundation.h>#import"Header.h"//self-created. h file to store header files or macro definitions that require a full project reference  #endif

#endif

2. Network Request Support HTTP

Add App Transport Security Settings in Info.plist, create allow arbitrary Loads Yes

3.debug mode and Release mode

Toggle Code:

#ifdef DEBUG    NSLog (@ "1111"); #else     NSLog (@ "1111222111"); #endif

Uses: such as printing information, such as the test version and on-line version needs a different reference, different macro definitions and so on.

4. Multiple target Management

11

5. Judging whether it is a real machine or a simulator
// Judging whether it's a real machine or  a simulator #if Target_os_iphone  //IPHONE Device  #endif    #if target_iphone_ SIMULATOR  //iPhone SIMULATOR  #endif  

Get ready to build a new app

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.