#define WoWWeakSelf __weak __typeof(self) weakSelf = self;
#define WoWStrongSelf __strong __typeof(weakSelf) strongSelf = weakSelf;
//礼包中心上方高度
#define kTopBarHeight 40.0f
/*
日志输出
*/
#ifdef DEBUG
#define WoWLog(...) NSLog(__VA_ARGS__)
#else
#define WoWLog(...)
#endif
#define WoWColor(r,g,b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0]
#define WoWColorWithAl(r,g,b,a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:a]
#define WoWColorFromRGB(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 kWoWThemeColor WoWColor(222,64,74)
#define kWoWThemeColor [UIColor colorWithHexString:@"#de162f"]
#define kWoWOrangeColor [UIColor colorWithHexString:@"#de162f"]
#define kWoWOrangeSelectColor [UIColor colorWithHexString:@"#cf152c"]
#define kWoWOrangeDisableColor [UIColor colorWithHexString:@"#f2a6b0"]
#define kWoWOrangeBottomColor [UIColor colorWithHexString:@"#efc7cc"]
#define kWoWGraySelectColor [UIColor colorWithHexString:@"#e8ebe8"]
#define kWoWGrayColor [UIColor colorWithHexString:@"#e8e8e8"]
#define kWoWBlueSelectColor [UIColor colorWithHexString:@"#3187cf"]
#define kWoWBlueColor [UIColor colorWithHexString:@"#3f8ed8"]
#define kWoWRedColor WoWColor(255,6,7)
//窗口透明背景
#define kWoWBackgroundColorWithAl WoWColorWithAl(0,0,0,0.4)
#define kWoWNavigationBarColor WoWColor(254,254,254)
////黑色字体标题颜色,重要信息
#define kWoWDarkTextColor [UIColor colorWithHexString:@"#131313"]
////灰色字体颜色,颜色较淡,辅助信息
#define kWoWLightGrayTextColor [UIColor colorWithHexString:@"#999999"]
////灰色字体颜色,颜色较深,辅助信息
#define kWoWDarkGrayTextColor [UIColor colorWithHexString:@"#666666"]
////背景色
#define kWoWBackgroundColor [UIColor colorWithHexString:@"#f3f3f3"]
//登录注册白色背景
#define kWoWWhiteBackColorWithAl WoWColorWithAl(248,248,248,0.7)
//登录注册大背景
#define kWoWGrayBackColorWithAl WoWColorWithAl(190,190,190,0.7)
//登录注册字体颜色
#define WoW_logintextColor [UIColor colorWithRed:42/255.0 green:65/255.0 blue:88/255.0 alpha:1.0]
//白色
#define kWoWWhiteColor WoWColor(255,255,255)
//分割线颜色,不可用状态
#define kWoWSeparatorColor [UIColor colorWithHexString:@"#e8ebe8"]
//绿色,按钮
#define kWoWGreenButtonColor WoWColor(0,204,111)
//屏幕大小
/* 当前设备的屏幕尺寸,含状态栏,例如320x480,也即分辨率,ios8以下不随设备方向而变化,ios8及以上是实时尺寸 */
#define kScreenWidth [[UIScreen mainScreen] bounds].size.width
#define kScreenHeight [[UIScreen mainScreen] bounds].size.height
#define kScreenSize [[UIScreen mainScreen] bounds].size
// 系统控件默认高度
//#define kStatusBarHeight [[UIApplication sharedApplication] statusBarFrame].size.height
#define kNavBarHeight2 self.navigationController.navigationBar.frame.size.height
#define kNavStatusHeight
#define kavStatusHeight1(A,B) ({__typeof(A) __a = (A);__typeof(B) __b = (B); __a > __b ? 32 : 44; })
// 系统控件默认高度
//#define kStatusBarHeight ((@available(iOS 11.0, *)&&(kScreenHeight>kScreenWidth)) ? 44 : 0)
#define kSafeTopMargin ({CGFloat safeTopMargin = 0;if(isIPhoneX) {if (kScreenWidth>kScreenHeight){safeTopMargin = 0;} else if (kScreenHeight>kScreenWidth) {safeTopMargin = 44;}}else {safeTopMargin = 0;}safeTopMargin;})
#define kSafeLeftRightMargin ({CGFloat safeLeftRightMargin = 0;if(isIPhoneX) {if (kScreenHeight>kScreenWidth){safeLeftRightMargin = 0;} else if (kScreenWidth>kScreenHeight) {safeLeftRightMargin = 44;}}else {safeLeftRightMargin = 0;}safeLeftRightMargin;})
#define kSafeBottomMargin ({CGFloat safeBottomMargin = 0;if(isIPhoneX) {if (kScreenHeight>kScreenWidth){safeBottomMargin = 34;} else if (kScreenWidth>kScreenHeight) {safeBottomMargin = 21;}}else {safeBottomMargin = 0;}safeBottomMargin;})
// 状态栏高度
#define STATUS_BAR_HEIGHT (iPhoneX ? 44.f : 20.f)
#define kStatusBarHeight ((isIPhoneX&&(kScreenHeight>kScreenWidth)) ? 44 : 0)
////#define kStatusBarHeight kStatusBarHeight1(statusBarHiddenStatus)
////#define kStatusBarHeight1(A) ({__typeof(A) __a = (A); __a ? 0 : 20; })
#define kNavBarHeight kNavBarHeight1(kScreenWidth,kScreenHeight)
#define kNavBarHeight1(A,B) ({__typeof(A) __a = (A);__typeof(B) __b = (B); __a > __b ? 32 : 44; })
//#define isVCBasedStatusBarAppearanceNum (NSNumber *)[[NSBundle mainBundle] objectForInfoDictionaryKey:@"UIViewControllerBasedStatusBarAppearance"]
////#define statusBarHiddenStatus [isVCBasedStatusBarAppearanceNum intValue] =1 ? self.prefersStatusBarHidden : [UIApplication sharedApplication].statusBarHidden
//#define statusBarHiddenStatus ({__typeof(isVCBasedStatusBarAppearanceNum) __a = (isVCBasedStatusBarAppearanceNum); __a ? self.prefersStatusBarHidden : [UIApplication sharedApplication].statusBarHidden; })
#define Interface_Flag (int)[UIDevice getDeviceOrientation] //横竖屏方向
/* 判断设备是否横屏 */
#define kIsDeviceLandscape (Interface_Flag == 1)
/* 判断设备是否竖屏 */
#define kIsDevicePortrait (Interface_Flag == 0)
//系统版本
#define iOS7Later ([UIDevice currentDevice].systemVersion.floatValue >= 7.0f)
#define iOS8Later ([UIDevice currentDevice].systemVersion.floatValue >= 8.0f)
#define iOS9Later ([UIDevice currentDevice].systemVersion.floatValue >= 9.0f)
#define iOS9_1Later ([UIDevice currentDevice].systemVersion.floatValue >= 9.1f)
#define iOS10Later ([UIDevice currentDevice].systemVersion.floatValue >= 10.0f)
#define iOSVersion [UIDevice currentDevice].systemVersion.floatValue
#define isIPhoneX ((kScreenWidth == 375.f && kScreenHeight == 812.f)||(kScreenWidth == 812.f && kScreenHeight == 375.f) ? YES : NO)