Created
April 16, 2014 22:43
-
-
Save CocoaBeans/10939928 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSInteger osxVersion; | |
if (floor(NSAppKitVersionNumber) <= NSAppKitVersionNumber10_6) { | |
//10.6.x or earlier systems | |
osxVersion = 106; | |
NSLog(@"Mac OSX Snow Leopard"); | |
} else if (floor(NSAppKitVersionNumber) <= NSAppKitVersionNumber10_7) { | |
/* On a 10.7.x or earlier system */ | |
osxVersion = 107; | |
NSLog(@"Mac OSX Lion"); | |
} else if (floor(NSAppKitVersionNumber) <= NSAppKitVersionNumber10_8) { | |
/* On a 10.8 - 10.8.x system */ | |
osxVersion = 108; | |
NSLog(@"Mac OSX Moutain Lion"); | |
} else { | |
/* 10.9 or later system */ | |
osxVersion = 109; | |
NSLog(@"Mac OSX: Mavericks or Later"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment