Last active
August 29, 2015 14:02
-
-
Save xNekOIx/bcd4cb4b8fbe697c814c to your computer and use it in GitHub Desktop.
iOS version check
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
@interface UIDevice(NKOSVersionCheck) | |
+ (BOOL)nko_isRunningOnIOS7OrLater; | |
@end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "UIDevice+OSVersionCheck.h" | |
@implementation UIDevice(NKOSVersionCheck) | |
+ (BOOL)nko_isRunningOnIOS7OrLater | |
{ | |
NSString *reqSysVer = @"7.0"; | |
NSString *currSysVer = [[UIDevice currentDevice] systemVersion]; | |
return [currSysVer compare:reqSysVer options:NSNumericSearch] != NSOrderedAscending; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment