Repeated code to check for iOS version
I use this snippet repeatedly in my app. So, it is better to read it once
and store it in the global variable or appDelegate or just keep executing
the snippet whenever needed?
#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice
currentDevice] systemVersion] compare:v options:NSNumericSearch] ==
NSOrderedAscending)
if (SYSTEM_VERSION_LESS_THAN(@"7.0"))
return NO;
return YES;
No comments:
Post a Comment