// // SystemVersion.m // GMKit // // Created by wangyang on 2017/11/8. // #import "SystemVersion.h" @implementation SystemVersion + (BOOL)equalTo:(NSString *)version { return [[[UIDevice currentDevice] systemVersion] compare:version options: NSNumericSearch] == NSOrderedSame; } + (BOOL)greaterThan:(NSString *)version { return [[[UIDevice currentDevice] systemVersion] compare:version options: NSNumericSearch] == NSOrderedDescending; } + (BOOL)greaterThanOrEqualTo:(NSString *)version { return [[[UIDevice currentDevice] systemVersion] compare:version options: NSNumericSearch] != NSOrderedAscending; } + (BOOL)lessThan:(NSString *)version { return [[[UIDevice currentDevice] systemVersion] compare:version options: NSNumericSearch] == NSOrderedAscending; } + (BOOL)lessThanOrEqualTo:(NSString *)version { return [[[UIDevice currentDevice] systemVersion] compare:version options: NSNumericSearch] != NSOrderedDescending; } @end