// // Common.h // 微信 // // #ifndef Common_h #define Common_h // iPhone設備及屏幕適配 //4的設備 #define KDevice_Is_Retina ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 960), [[UIScreen mainScreen] currentMode].size) : NO) //5,5s的設備 #define kDevice_Is_iPhone5 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) : NO) #define kDevice_Is_iPhone6 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(750, 1334), [[UIScreen mainScreen] currentMode].size) : NO) #define kDevice_Is_iPhone6Plus ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1242, 2208), [[UIScreen mainScreen] currentMode].size) : NO) #define kKeyWindow [UIApplication sharedApplication].keyWindow #define kScreenBounds [UIScreen mainScreen].bounds #define kScreenW [UIScreen mainScreen].bounds.size.width #define kScreenH [UIScreen mainScreen].bounds.size.height #endif /* Common_h */