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