Skip to content

Instantly share code, notes, and snippets.

@xNekOIx
Last active August 29, 2015 14:02
Show Gist options
  • Save xNekOIx/bcd4cb4b8fbe697c814c to your computer and use it in GitHub Desktop.
Save xNekOIx/bcd4cb4b8fbe697c814c to your computer and use it in GitHub Desktop.
iOS version check
#import <Foundation/Foundation.h>
@interface UIDevice(NKOSVersionCheck)
+ (BOOL)nko_isRunningOnIOS7OrLater;
@end
#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