+ (BOOL) isIOS5
{
NSString *os5 = @"5.0";
NSString *currSysVer = [[UIDevice currentDevice] systemVersion];
// currSysVer = @"5.0.1";
if ([currSysVer compare:os5 options:NSNumericSearch] == NSOrderedAscending) //lower than 4
{
return NO;
}
else if ([currSysVer compare:os5 options:NSNumericSearch] == NSOrderedDescending) //5.0.1 and above
{
return YES;
}
else // IOS 5
{
return YES;
}
return NO;
}
+ (BOOL) isIOS6
{
NSString *os6 = @"6.0";
NSString *currSysVer = [[UIDevice currentDevice] systemVersion];
// currSysVer = @"6.0.1";
if ([currSysVer compare:os6 options:NSNumericSearch] == NSOrderedAscending)
{
return NO;
}
else if ([currSysVer compare:os6 options:NSNumericSearch] == NSOrderedDescending)
{
return YES;
}
else // IOS 5
{
return YES;
}
return NO;
}
No comments:
Post a Comment