判断 iOS 系统版本
2012-10-10 11:10
411 查看
/* * System Versioning Preprocessor Macros */ #define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame) #define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending) #define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending) #define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending) #define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending) /* * Usage */ if (SYSTEM_VERSION_LESS_THAN(@"4.0")) { ... } if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"3.1.1")) { ... }
相关文章推荐
- iOS 判断iphone ipad 系统版本
- ios 设备 系统 版本 判断
- ios 设备 系统 版本 判断
- iOS 判断iphone ipad 系统版本
- js判断移动端系统版本(ios/android)
- 判断 iOS 系统版本
- 判断 iOS 系统版本
- iOS 判断iphone ipad 系统版本
- 通过浏览器,javascript判断 ios 系统版本
- iOS常用判断的宏定义:系统版本号,屏幕宽高,设备型号, 自定义NSLog等
- 字符串处理——iOS版本判断
- ios 判断系统语言
- 判断 当前设备 系统版本
- iOS小技巧21-MacOS 苹果系统下Outlook打不开,显示“您需要最新版本的Outlook才能使用此数据库”
- iOS开发 判断当前APP版本和升级
- Android开发实用技巧:判断当前系统语言版本
- 如何判断IOS的设备版本型号
- IOS判断版本之编译期和运行时
- 怎样 获取 ios的系统版本
- iOS - 判断当前系统版本号