#define IS_PAD (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
#define IS_IOS7 ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7)
#define IS_IOS8 ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8)
#define IS_IOS9 ([[[UIDevice currentDevice] systemVersion] floatValue] >= 9)
#define IS_IOS10 ([[[UIDevice currentDevice] systemVersion] floatValue] >= 10)
#define IS_IOS11 ([[[UIDevice currentDevice] systemVersion] floatValue] >= 11)
#define kSystemVersion [[UIDevice currentDevice] systemVersion]
#define kSystemName [[UIDevice currentDevice] systenName]
#define UUID [UIDevice currentDevice].identifierForVendor.UUIDString
#define kAppVersion [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]
#define RGB(r, g, b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0]
#define RGBA(r, g, b, a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:a]
#define HEX(hexValue) [UIColor colorWithRed:((float)((hexValue & 0xFF0000) >> 16))/255.0 green:((float)((hexValue & 0xFF00) >> 8))/255.0 blue:((float)(hexValue & 0xFF))/255.0 alpha:1.0]
#define HEXA(hexValue, a) [UIColor colorWithRed:((float)((hexValue & 0xFF0000) >> 16))/255.0 green:((float)((hexValue & 0xFF00) >> 8))/255.0 blue:((float)(hexValue & 0xFF))/255.0 alpha:a]
#define FONT(NAME, FONTSIZE) [UIFont fontWithName:(NAME) size:(FONTSIZE)]
#define SYSTEMFONT(FONTSIZE) [UIFont systemFontOfSize:FONTSIZE]
#define BOLDSYSTEMFONT(FONTSIZE) [UIFont boldSystemFontOfSize:FONTSIZE]
#define kScreenWidthRatio (Main_Screen_Width / 375.0)
#define kScreenHeightRatio (Main_Screen_Height / 667.0)
#define AdaptedFont(font) SYSTEMFONT(AdaptedWidth(font))
#define AdaptedWidth(width) ceilf((width) * kScreenWidthRatio)
#define AdaptedHeight(height) ceilf((height) * kScreenHeightRatio)
#define kScreenWidth [UIScreen mainScreen].bounds.size.width
#define kScreenHeight [UIScreen mainScreen].bounds.size.height
#define kStatusBarHeight [UIApplicationsharedApplication].statusBarFrame.size.height
#define kNavBar_Height (kStatusBar_Height + 44)
#define kTabBarHeight (CGFloat)([[CommonUtility phoneModel] isEqualToString:@"iPhone X"]?(49+34):(49))
#define kApplication [UIApplication sharedApplication]
#define kAppDelegate ((AppDelegate *)[[UIApplication sharedApplication] delegate])
#define kKeyWindow [UIApplication sharedApplication].keyWindow
#define kPathTemp NSTemporaryDirectory()
#define kPathDocument [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) firstObject]
#define kPathCache [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) firstObject]
//可配对引用在外面用weakSelf(self),block用strongSelf(self)
//也可以单独引用在外面用weakSelf(self) block里面用weakself
#define weakSelf(type) __weak typeof(type) weak##type = type;
#define strongSelf(type) __strong typeof(type) type = weak##type;
#define kAngleToRadian(x) (M_PI * (x) / 180.0)
#define kRadianToAngle(radian) (radian * 180.0) / (M_PI)