IOS macros define the system version of the judgment
#define IOS7 ([[[Uidevice Currentdevice] systemversion] floatvalue] >= 7.0)#define Ios7later ([Uidevice currentdevice].systemversion.floatvalue >= 7.0f)#define Ios8later ([Uidevice currentdevice].systemversion.floatvalue >= 8.0f)#define Ios9later ([Uidevice currentdevice].systemversion.floatvalue >= 9.0f)#define Ios9_1later ([Uidevice currentdevice].systemversion.floatvalue >= 9.1f)#define Ios10_1later ([Uidevice currentdevice].systemversion.floatvalue >= 10.1f)A lot of people are using this method, I also used this method of macro definition, but in the development environment of Xcode has already defined a lot of system version discriminant macro definition contains iOS, MAC, TVOS, watchOS of the system version of the macro, as follows:
Just use the following method when you are using it.#ifdef __IPHONE_7_0new feature code for//IOS7#endifor by using:#if __iphone_os_version_max_allowed >= __iphone_7_0new feature code for//IOS7#endif (__iphone_os_version_max_allowed This definition is in the simulator-ios7.0/usr/include/availabilityinternal.h file)It's done.
The IOS system version is judged