IOS版本判断
2013-03-22 16:33
176 查看
转:http://blog.csdn.net/jinglijun/article/details/7292674
-(void)getIOSVersion
{
//#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 50000 //此方法和编译器相关
//quanju.iOSVersion=1;
//#endif
float version = [[[UIDevice currentDevice] systemVersion] floatValue];
if (version >= 5.0)
{
quanju.iOSVersion=1;//定义全局变量标记ios版本
}
}
-(void)getIOSModel
{
CGSize sizeToRequest; if([[[UIDevicecurrentDevice] model] rangeOfString:@"iPad"].location== 0) sizeToRequest = CGSizeMake(748, 110); else sizeToRequest = CGSizeMake(320, 48);
}
//下面是ios内其他相关信息的判断方法
-(void)getIOSVersion
{
//#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 50000 //此方法和编译器相关
//quanju.iOSVersion=1;
//#endif
float version = [[[UIDevice currentDevice] systemVersion] floatValue];
if (version >= 5.0)
{
quanju.iOSVersion=1;//定义全局变量标记ios版本
}
}
-(void)getIOSModel
{
CGSize sizeToRequest; if([[[UIDevicecurrentDevice] model] rangeOfString:@"iPad"].location== 0) sizeToRequest = CGSizeMake(748, 110); else sizeToRequest = CGSizeMake(320, 48);
}
//下面是ios内其他相关信息的判断方法
获取进程信息和设备信息(包括设备类型,序列号,ios版本等) [[NSProcessInfo processInfo] globallyUniqueString], [[NSProcessInfo processInfo] hostName], [[NSProcessInfo processInfo] operatingSystemName], [[NSProcessInfo processInfo] operatingSystemVersionString], [[NSProcessInfo processInfo] physicalMemory], [[NSProcessInfo processInfo] processName]); —————————————————————————————— [UIDevice currentDevice].uniqueIdentifier, [UIDevice currentDevice].name, [UIDevice currentDevice].systemName, [UIDevice currentDevice].systemVersion, [UIDevice currentDevice].model, [UIDevice currentDevice].localizedModel, [UIDevice currentDevice].batteryLevel ___________________________________________________ NSLog([[UIDevice currentDevice] name]); // Name of the phone as named by user NSLog([[UIDevice currentDevice] uniqueIdentifier]); // A GUID like string NSLog([[UIDevice currentDevice] systemName]); // "iPhone OS" NSLog([[UIDevice currentDevice] systemVersion]); // "2.2.1" NSLog([[UIDevice currentDevice] model]); // "iPhone" on both devices |
相关文章推荐
- iOS基础8:自定义MyData/自定义SQLite用于网络判断,版本判断,图片缓存处理,下载或者上传的GET或POST请求,加密手段,.数据解析
- ios版本判断
- ios开发首次安装或者版本升级的引导页的判断
- IOS判断版本
- js判断IE浏览器版本、判断安卓、iOS、判断微信浏览器、判断PC端浏览器等
- IOS 版本控制判断
- 在预编译阶段判断ios版本
- IOS 判断应用版本和升级提示
- iOS 判断iphone ipad 系统版本
- IOS判断版本之编译期和运行时
- ios 设备判断 版本判断总结
- 判断ios版本
- IOS判断版本
- ios APP初次安装以及版本更新后,判断是否需要显示引导页
- 判断 iOS 系统版本
- iOS 判断iOS系统版本
- IOS版本判断
- 怎么判断ios 版本
- 程序中如何判断iOs的版本
- 判断设备及iOS版本的宏