Repeated code to check for iOS version -
i use snippet repeatedly in app. so, better read once , store in global variable or appdelegate or keep executing 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;
i keep in variable owned appdelegate - it's simple bool, it's not storage intensive.
however, snippet not system intensive @ - it's pretty free performance-wise. since thinking kind of optimization, though, better keep in appdelegate.
Comments
Post a Comment