Last Updated: February 25, 2016
·
465
· hash3r

check whether iOS version is equal or greater that X version

You can add a define for checking whether iOS version is equal or greater that Xparameter_ version

#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v)  ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)

    static BOOL iOS7orLater = SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0");