iOS开发常用宏
来源:互联网 发布:轻松赚软件怎么样 编辑:程序博客网 时间:2024/06/06 12:53
#define RELEASE(obj) { [obj release]; obj = nil; }
//是否arc
#if ! __has_feature(objc_arc)
[xxx release];
#endif
//判断是真机还是模拟器
#if TARGET_OS_IPHONE
//iPhone Device
#endif
#if TARGET_IPHONE_SIMULATOR
//iPhone Simulator
#endif
///是否iPad
#define IPAD UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad
///是否iPhone
#define IPHONE UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone
///版本
#define VERSION [[[UIDevice currentDevice] systemVersion] floatValue]
///是否 ios7
#define IOS7 (VERSION>=7.0)
//return 1pt所占px
#define SCALE ([UIScreen mainScreen].scale)
///系统屏幕大小
#define WIN_SIZE ([UIScreen mainScreen].bounds.size)
//是否Retina屏
#define IS_Retina (SCALE>=2.0)
///颜色
#define COLOR_RGB(r,g,b,a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:a]
//返回angle(float) degrees(360)
#define angleForDegrees(degrees) (M_PI * (degrees) / 180.0)
- iOS开发常用宏
- iOS开发常用宏
- ios开发常用宏
- iOS开发常用宏
- iOS 开发常用宏
- ios开发常用宏
- iOS-开发常用宏
- 【iOS开发】常用宏
- iOS开发常用宏
- IOS开发常用宏
- iOS 开发常用宏
- iOS开发常用宏
- iOS开发常用的宏
- ios开发常用的宏
- iOS开发常用的宏
- iOS开发常用的宏
- iOS开发常用的宏
- ios开发常用的宏
- linux查询video设备类型
- 为jquery Easyui 添加小图标
- 使用git连接Xcode连接到OSchina上
- bzoj 1024 生日快乐 暴力搜索
- 使用Memory Analyzer tool(MAT)分析内存泄漏(二)
- iOS开发常用宏
- 基于Video4Linux 的USB 摄像头图像采集实现
- 黑马程序员—循环结构与方法
- hdu 2025 查找最大元素
- 如何让MySQL开启远程连接
- Nagios4.0.8 详细安装配置
- appkey 即 paySignkey
- 大于2T的分区方式parted##
- 云课堂java-第七周编程作业1-分解质因数