很多情况下,特别是提测阶段爆出的很多bug,会跟系统的版本有关系。所以,根据不同的ios版本进行UI适配,或者其他的处理,是很常见的需求。
现在提供一种获取ios版本的方法:
float systemVersion = [[[UIDevice currentDevice] systemVersion] doubleValue];
if (systemVersion >= 8 && systemVersion < 9) { //ios 8.X的系统
***;
}
很多情况下,特别是提测阶段爆出的很多bug,会跟系统的版本有关系。所以,根据不同的ios版本进行UI适配,或者其他的处理,是很常见的需求。
现在提供一种获取ios版本的方法:
float systemVersion = [[[UIDevice currentDevice] systemVersion] doubleValue];
if (systemVersion >= 8 && systemVersion < 9) { //ios 8.X的系统
***;
}