带参数宏的定义

#define kColor(r,g,b,a) [UIColor colorWithRed:(r/255.0f) green:(g/255.0f) blue:(b/255.0f) alpha:a]

//在.a文件中取东西

#define PayBundle @"PayBundle.bundle"

#define MYBUNDLE_PATH [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent: PayBundle]

#define ResourcePath(fileName) [MYBUNDLE_PATH stringByAppendingPathComponent:fileName]

原文地址:https://www.cnblogs.com/zhaozhongpeng/p/4867631.html