在预编译阶段判断ios版本
2016-06-27 本文已影响64人
wzf_taker
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_5_0
// This code will compile on versions >= ios5.0
#else
// This code will compile on versions<5.0
#endif
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_5_0
// This code will compile on versions >= ios5.0
#else
// This code will compile on versions<5.0
#endif