//常用宏定义
//是否为V以上系统
#define IOS(V) [[[UIDevice currentDevice] systemVersion]floatValue]>=V
// 系统delegate
#define SHAppDelegate (AppDelegate *)[UIApplication sharedApplication].delegate
//三原色
#define RGB(R,G,B) [UIColor colorWithRed:R/255.0 green:G/255.0 blue:B/255.0 alpha:1.0]
// 字体颜色16进制0x
#define GmColorWith0xColor(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 SHHeight ([UIScreen mainScreen].bounds.size.height)
#define SHWidth ([UIScreen mainScreen].bounds.size.width)
// 界面宽高度
#define SHScreenViewWidth self.view.frame.size.width
#define SHScreenViewHeight self.view.frame.size.height
#pragma mark ----- 宏定义
#define CSHNavBarHight 64 // 导航高度
#define CSHTabBarHight 48 // 状态栏的高度
#define CSHTabBarImageHight 44 // 状态栏的图片高度
网友评论