Find version iOS, use function [UIDevice currentDevice] systemVersion]
____________________________________________________________
+ (BOOL) isIOS7
{
NSString *version = [[UIDevice currentDevice] systemVersion];
if ([version floatValue] >= 7.0) {
return YES;
}else {
return NO;
}
}
____________________________________________________________
+ (BOOL) isIOS6
{
NSString *version = [[UIDevice currentDevice] systemVersion];
if ([version floatValue] >= 6.0 && [version floatValue] < 7.0) {
return YES;
}else {
return NO;
}
}
____________________________________________________________
+ (BOOL) isIOS5
{
NSString *version = [[UIDevice currentDevice] systemVersion];
if ([version floatValue] >= 5.0 && [version floatValue] < 6.0) {
return YES;
}else {
return NO;
}
}
No comments:
Post a Comment