.pch的文件的使用

在.pch文件中声明的内容,整个项目都可以用到, 创建.pch文件后需要配置一下

.pch的文件的使用_第1张图片
Snip20160527_2.png

#ifndef PrefixHeader_pch
#define PrefixHeader_pch

// Include any system framework and library headers here that should be included in all compilation units.
// You will also need to set the Prefix Header build setting of one or more of your targets to reference this file.

#import "UIView+Extension.h"
#import "NSArray+Log.h"
#import "NSDictionary+Log.h"
#import "UIBarButtonItem+BSExtention.h"
#import "BSConst.h"
#import "NSDate+BSExtension.h"

#ifdef DEBUG // 处于开发阶段
#define BSLog(...) NSLog(__VA_ARGS__)
#else // 处于发布阶段
#define BSLog(...)
#endif

// RGB颜色
#define BSColor(r, g, b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1]

#define BSGlobalBg BSColor(223, 223, 223)


#define BSScreenW [UIScreen mainScreen].bounds.size.width
#define BSScreenH [UIScreen mainScreen].bounds.size.height

#define BSLogFunc BSLog(@"%s", __func__)

#endif /* PrefixHeader_pch */

你可能感兴趣的:(.pch的文件的使用)