标签:style blog http color io os ar 使用 for
mac 下获取 os x 的系统版本,使用 oc cocoa
1:
#import <CoreServices/CoreServices.h> SInt32 major, minor, bugfix; Gestalt(gestaltSystemVersionMajor, &major); Gestalt(gestaltSystemVersionMinor, &minor); Gestalt(gestaltSystemVersionBugFix, &bugfix); NSString *systemVersion = [NSString stringWithFormat:@"%d.%d.%d", major, minor, bugfix];
2:
NSDictionary *systemVersionDictionary = [NSDictionary dictionaryWithContentsOfFile: @"/System/Library/CoreServices/SystemVersion.plist"]; NSString *systemVersion = [systemVersionDictionary objectForKey:@"ProductVersion"];
参考:http://stackoverflow.com/questions/6492038/find-mac-os-x-version-number-in-objective-c
mac 下获取 os x 的系统版本,使用 oc cocoa
标签:style blog http color io os ar 使用 for
原文地址:http://www.cnblogs.com/cocoajin/p/4037675.html