标签:
由于ios的sdk不断升级,我们可能会去获取到设备的版本号。根据不同的ios系统去coding。方法很简单就不再解释。代码如下:
NSUInteger DeviceSystemMajorVersion() { static NSUInteger _deviceSystemMajorVersion = -1; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ _deviceSystemMajorVersion = [[[[UIDevice currentDevice] systemVersion] componentsSeparatedByString:@"."][0] integerValue]; }); return _deviceSystemMajorVersion; }
标签:
原文地址:http://blog.csdn.net/u012186949/article/details/44303079