As suggested by the official Apple docs: you can use the NSFoundationVersionNumber
, from the NSObjCRuntime.h
header file.
if (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_6_1) {
// here you go with iOS 7
}
原文:http://www.cnblogs.com/spiderdzl/p/4003382.html