Finding the IOS version on a device programatically.
key here is to use the NSFoundationVersionNumber and compare it with the in built NSFoundationVersionNumber_iOS_7_1 or what ever other ones you want to compare.For my need i am just checking to see if the IOS version is atleast 8 and above..
-(bool) isOSAtleastVersion8{
bool is_IOS8=false;
if(floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_7_1)
{
is_IOS8=true;
}
else
{
is_IOS8=false;
}
return is_IOS8;
}
-- Bobby
No comments:
Post a Comment