// 1.判断是否为iOS7
#define iOS7 ([[UIDevice currentDevice].systemVersion doubleValue] >= 7.0)
// 2.获得RGB颜色
#define MXColor(r, g, b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0]
// 3.自定义Log
#ifdef DEBUG
#define MXLog(...) NSLog(__VA_ARGS__)
#else
#define MXLog(...)
#endif
// 4.是否为4inch
#define fourInch ([UIScreen mainScreen].bounds.size.height == 568)
// 5 常用对象
#define MXNotificationCenter [NSNotificationCenter defaultCenter]
#define MXUserDefaults [NSUserDefaults standardUserDefaults]
本文介绍了如何在iOS7环境下实现RGB颜色的获取,自定义日志记录,判断设备屏幕尺寸是否为4英寸,并展示了常用的NotificationCenter和UserDefaults对象的使用方法。
491

被折叠的 条评论
为什么被折叠?



