///屏幕的宽度
#define kScreenWidth [UIScreen mainScreen].bounds.size.width
///屏幕的高度
#define kScreenHeight [UIScreen mainScreen].bounds.size.height
///storyboard
#define STO [UIStoryboard storyboardWithName:"Main" bundle:nil]
//定义字体函数
#define FONT(a) [UIFont systemFontOfSize:a ]
//系统标准保存键值
#define UserDefaultStandard [NSUserDefaults standardUserDefaults]
/** 弱引用*/
#define kWeakSelf(type) __weak typeof(type) weak##type = type;
/** 强引用*/
#define kStrongSelf(type) __strong typeof(type) type = weak##type;
/** 由角度转换弧度*/
#define kDegreesToRadian(x) (M_PI * (x) / 180.0)
/** 由弧度转换角度*/
#define kRadianToDegrees(radian) (radian * 180.0) / (M_PI)
/** 获取沙盒 Document 路径*/
#define kDocumentPath [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) firstObject]
/** 获取沙盒 temp 路径(注:iPhone 重启会清空)*/
#define kTempPath NSTemporaryDirectory()
/** 获取沙盒 Cache 路径*/
#define kCachePath [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) firstObject]
///重写log
#ifdef DEBUG
#define DLog(...) NSLog(__VA_ARGS__)
#else
#define DLog(...)
#endif
//定义颜色函数
#define RGBA(r,g,b,a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:a]
#define RGBCOLOR(a,b,c) RGBA(a,b,c,1.0)
#define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
// 控件尺寸适配的宏函数
#define kFit(x) (kScreenWidth*((x)/375))
//G-C-D
#define BACK(block) dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), block)
#define MAIN(block) dispatch_async(dispatch_get_main_queue(),block)
// 不堵塞线程并在主线程的延迟执行 timer:延迟时间,单位:秒;与主线程同步
#define GCDMainDelay(timer,block) dispatch_after(dispatch_time(DISPATCH_TIME_NOW, INT64_C(timer) * NSEC_PER_SEC), dispatch_get_main_queue(), block)
// 将code调到主线程执行,与主线程同步
#define GCDMain(block) dispatch_async(dispatch_get_main_queue(), block)