美文网首页
判断iOS操作系统的几种方法

判断iOS操作系统的几种方法

作者: FallPine | 来源:发表于2017-02-28 19:40 被阅读61次
  • 方法一:
//值为 1
[[[[UIDevice currentDevice] systemVersion] substringToIndex:1] integerValue]
  • 方法二:
//值为10.000000
[[UIDevice currentDevice] systemVersion].floatValue,
  • 方法三:
//值为10.0
[[UIDevice currentDevice] systemVersion]

常用的是方法二和方法三

参考文章:
【iOS 10 判断系统版本方式更新】

相关文章

网友评论

      本文标题:判断iOS操作系统的几种方法

      本文链接:https://www.haomeiwen.com/subject/opcfgttx.html