#define IOS_VERSION [[[UIDevice currentDevice] systemVersion] floatValue] if (IOS_VERSION>=7.0){ //版本大于7.0 }