iOS 常用的宏定义
来源:互联网 发布:手游数据查询 编辑:程序博客网 时间:2024/05/21 14:03
//NavBar高度
#define NavigationBar_HEIGHT 44
//获取屏幕 宽度、高度
#define SCREEN_WIDTH ([UIScreen mainScreen].bounds.size.width)#define SCREEN_HEIGHT ([UIScreen mainScreen].bounds.size.height)
//获取系统版本
#define IOS_VERSION [[UIDevice currentDevice] systemVersion] floatValue]#define CurrentSystemVersion [UIDevice currentDevice] systemVersion]
//rgb颜色转换
#define RGBA(r,g,b,a) [UIColor colorWithRed:r/255.0f green:g/255.0f blue:b/255.0f alpha:a]#define RGB(r,g,b) RGBA(r,g,b,1.0f)#define HEXCOLOR(hex) [UIColor colorWithRed:((float)((hex & 0xFF0000) >> 16)) / 255.0 green:((float)((hex & 0xFF00) >> 8)) / 255.0 blue:((float)(hex & 0xFF)) / 255.0 alpha:1]//16进制转rgb
//背景色
#define BACKGROUND_COLOR [UIColor colorWithRed:242.0/255.0 green:236.0/255.0 blue:231.0/255.0 alpha:1.0]
//NSUserDefaults 实例化
#define USER_DEFAULT [NSUserDefaults standardUserDefaults]
阅读全文
0 0
- iOS 常用的宏定义
- iOS 常用的宏定义
- ios 常用的宏定义
- iOS常用的宏定义
- iOS 常用的宏定义
- iOS 常用的宏定义
- IOS常用的宏定义
- ios常用的宏定义
- ios 常用的宏定义
- iOS 常用的宏定义
- IOS常用的定义
- IOS 常用宏定义
- iOS常用宏定义
- iOS 常用宏定义
- ios常用宏定义
- IOS 常用宏定义
- IOS常用宏定义
- IOS 常用宏定义
- Macbook 中关于下载器和Youtube视频及字幕下载播放问题
- python3格式化输出
- CCF-训练50题-NO.2-图像旋转问题
- tf.identity的意义以及用例
- HDFS JAVA API操作
- iOS 常用的宏定义
- NUIST OJ 1350-1352 面朝大海,春暖花开【初识线段树】
- 剑指offer 从尾到头打印链表
- Python数据类型:列表
- for 创建一个方法:键盘录入一个数 ,求它的 阶乘 及 阶乘的和
- GoldenGate 传统抽取进程随 DataGuard 主备快速切换的方案(ADG 模式)
- [POJ] 2528
- java注解
- Ubuntu 16.04 (linux)下MySQL的安装