006.宏_代码效率
// 屏幕宽度
#define screenWidth [UIScreen mainScreen].bounds.size.width
// 屏幕高度
#define screenHeight [UIScreen mainScreen].bounds.size.height
// 系统版本字符串
#define Version = [[UIDevice currentDevice] systemVersion]
// 系统版本value
#define VersionValue = [[[UIDevice currentDevice] systemVersion] floatValue]
// 获得沙盒路径---其中FilePath为要获得的文件名,其作为宏的参数,调用宏时确定
#define AccountFilepath(FilePath) [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent:(FilePath)] )
// log日志(判断是否是DEBUG)
#ifdef DEBUG
#define YDLog(...) NSLog(__VA_ARGS__)
#else
#define YDLog(...)
#endif
posted on 2015-08-04 12:12 juicecoffeetea 阅读(168) 评论(0) 编辑 收藏 举报