编写category时的便利宏(用于解决category方法从静态库中加载需要特别设置的问题)
2016-05-28 15:53
676 查看
代码摘录自YYKit:https://github.com/ibireme/YYKit
/**
Add this macro before each category implementation, so we don't have to use
-all_load or -force_load to load object files from static libraries that only
contain categories and no classes.
More info: http://developer.apple.com/library/mac/#qa/qa2006/qa1490.html .
*******************************************************************************
Example:
YYSYNTH_DUMMY_CLASS(NSString_YYAdd)
*/
#ifndef YYSYNTH_DUMMY_CLASS
#define YYSYNTH_DUMMY_CLASS(_name_) \
@interface YYSYNTH_DUMMY_CLASS_ ## _name_ : NSObject @end \
@implementation YYSYNTH_DUMMY_CLASS_ ## _name_ @end
#endif
/**
Add this macro before each category implementation, so we don't have to use
-all_load or -force_load to load object files from static libraries that only
contain categories and no classes.
More info: http://developer.apple.com/library/mac/#qa/qa2006/qa1490.html .
*******************************************************************************
Example:
YYSYNTH_DUMMY_CLASS(NSString_YYAdd)
*/
#ifndef YYSYNTH_DUMMY_CLASS
#define YYSYNTH_DUMMY_CLASS(_name_) \
@interface YYSYNTH_DUMMY_CLASS_ ## _name_ : NSObject @end \
@implementation YYSYNTH_DUMMY_CLASS_ ## _name_ @end
#endif
相关文章推荐
- 编写category时的便利宏(用于解决category方法从静态库中加载需要特别设置的问题)
- dajango学习笔记二
- Django迁移
- Etcd操作简单介绍
- DragonBoard 410c的LittleKernel详解
- Google:Andriod 系统前景不容乐观
- mongo-单节点安装
- mongo-三节点集群安装
- golang学习之select用法
- Guava学习笔记:Google Guava 类库简介
- Futures/Promises Golang方式实现
- Google搜索引擎使用技巧
- Google Postman插件
- (go邮件列表问题记录2)
- 每日安全资讯:命案侦破过程揭示 Google 能够跟踪全世界的手机
- Hust oj 1074 Hexagonal Tiles(递推)
- POJ 3635 Dragon Balls (并查集)
- Go语言学习资源
- Google Play APK扩展文件机制及开发流程详解
- Google推荐的图片加载库Glide介绍