Create a gist now

Instantly share code, notes, and snippets.

Get iOS system version as float
+(float)systemVersion
{
NSArray * versionCompatibility = [[UIDevice currentDevice].systemVersion componentsSeparatedByString:@"."];
float total = 0;
int pot = 0;
for (NSNumber * number in versionCompatibility)
{
total += number.intValue * powf(10, pot);
pot--;
}
return total;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment