//
// SystemVersion.h
// GMKit
//
// Created by wangyang on 2017/11/8.
//
#import <Foundation/Foundation.h>
#define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options: NSNumericSearch] == NSOrderedSame)
#define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options: NSNumericSearch] == NSOrderedDescending)
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options: NSNumericSearch] != NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options: NSNumericSearch] == NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options: NSNumericSearch] != NSOrderedDescending)
@interface SystemVersion : NSObject
+ (BOOL)equalTo:(NSString *)version;
+ (BOOL)greaterThan:(NSString *)version;
+ (BOOL)greaterThanOrEqualTo:(NSString *)version;
+ (BOOL)lessThan:(NSString *)version;
+ (BOOL)lessThanOrEqualTo:(NSString *)version;
@end
-
jz authored2499948e