iOS 版本判定
2015-09-07 10:53
543 查看
double version = [[UIDevice
currentDevice].systemVersion
doubleValue];//判定系统版本。
if(version>8.0f){
[[UINavigationBar
appearance] setBackgroundImage:[UIImage
imageNamed: @"navigationBar.jpg"]
forBarMetrics:UIBarMetricsDefault];
NSURL *url = [NSURL
URLWithString:UIApplicationOpenSettingsURLString];
[[UIApplication
sharedApplication] openURL:url];
}else{
UIAlertView *alert = [[UIAlertView
alloc] initWithTitle:@"提示"
message:@"当前版本过低"
delegate:self
cancelButtonTitle:nil
otherButtonTitles:@"确定",
nil];
[alert
show];
}
currentDevice].systemVersion
doubleValue];//判定系统版本。
if(version>8.0f){
[[UINavigationBar
appearance] setBackgroundImage:[UIImage
imageNamed: @"navigationBar.jpg"]
forBarMetrics:UIBarMetricsDefault];
NSURL *url = [NSURL
URLWithString:UIApplicationOpenSettingsURLString];
[[UIApplication
sharedApplication] openURL:url];
}else{
UIAlertView *alert = [[UIAlertView
alloc] initWithTitle:@"提示"
message:@"当前版本过低"
delegate:self
cancelButtonTitle:nil
otherButtonTitles:@"确定",
nil];
[alert
show];
}
相关文章推荐
- iOS Wi-Fi 描述文件:关于“自动加入”和单一连接密码设置
- IOS应用程序多语言本地化解决方案
- 《转》nagios 详细的安装及配置!
- iOS开发 iOS8系统新出cell侧滑View
- iOS NSString的长度计算
- IOS彩票第一天基本框架搭建
- IOS ARC项目使用非ARC文件
- IOS中懒加载
- iOS开源库
- iOS学习--NSCalendar
- iOS中3种正则表达式的使用与比较
- IOS中点语法
- iOS中的delegate的用法和规范
- iOS 开发之NSTimer使用初探
- iOS开发:MKMapView性能优化
- iOS开发的就业形势怎么样?
- iOS学习笔记22- 解决RegexKitLite编译报错
- IOS手势
- ios视频和音频的合成
- iOS:KVO的概述与使用