个人代码中常用的宏定义

来源:互联网 发布:海颐软件 编辑:程序博客网 时间:2024/05/19 14:51
// 2.判断是否为iOS7#define HBMiOS7 ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0)#define HBMiOS8 ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)// 3.获得颜色#define HBMColor(r, g, b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1]//图片名字#define HBMImage(imageName) [UIImage imageNamed:imageName]//字体大小#define HBMFont(size) [UIFont systemFontOfSize:size]//视图各类坐标#define HBMViewY(view) HBMViewYPoint(view)+HBMViewHeight(view)#define HBMViewX(view) HBMViewXPoint(view)+HBMViewWidth(view)#define HBMViewWidth(view) view.frame.size.width#define HBMViewHeight(view) view.frame.size.height#define HBMViewXPoint(view) view.frame.origin.x#define HBMViewYPoint(view) view.frame.origin.y

#define kClientInfo [[UIDevice currentDevice] uniqueDeviceIdentifier]

0 0