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
}
时间: 2024-10-22 08:59:38