.pch的文件的使用

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

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 */

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Android 自定义View的各种姿势1 Activity的显示之ViewRootImpl详解 Activity...
    passiontim阅读 175,776评论 25 709
  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 135,675评论 19 139
  • Spring Boot 参考指南 介绍 转载自:https://www.gitbook.com/book/qbgb...
    毛宇鹏阅读 47,095评论 6 342
  • 虽然今天下午有小雨飘洒,也挡不住莀莀户外玩的热情 感恩莀莀的坚持:让我也跟着欣赏了植物园的秋色,月季园里的月季花早...
    莀宝贝阅读 858评论 2 1
  • 系列文章导航 JavaScript动画1-速度动画JavaScript动画2-缓冲运动JavaScript动画3-...
    你好星期四阅读 3,803评论 0 2