ios 获得版本号

获取iphone的系统信息使用[UIDevice currentDevice],信息如下:

 [[UIDevice currentDevice] systemName]:系统名称,如iPhone OS

[[UIDevice currentDevice] systemVersion]:系统版本,如4.2.1

[[UIDevice currentDevice] model]:The model of the device,如iPhone或者iPod touch

[[UIDevice currentDevice] uniqueIdentifier]:设备的惟一标识号,deviceID

[[UIDevice currentDevice] name]:设备的名称,如 张三的iPhone

[[UIDevice currentDevice] localizedModel]:The model of the device as a localized string,类似model

注释:iOS 最常见的获取系统版本号的方法是:[[[UIDevice currentDevice] systemVersion] floatValue]但是,这个floatValue是不靠谱的,这也算是iOS SDK的一个bug吧。看一下上面的函数在8.2系统上的表现。

 

posted @ 2016-07-29 15:51  柳仙慧子  阅读(238)  评论(0编辑  收藏  举报