|
1
2
3
4
5
6
7
8
9 |
if([[[UIDevicecurrentDevice]systemVersion]floatValue]>=7.0) { // iOS7.0及以上版本系统适配}if([UIScreen mainScreen].bounds.size.height == 568){ // iPhone 屏幕适配} |
可以写成宏定义放在pch文件中,
|
1
2
3
4 |
// 判断是否为iPhone5#define iPhone5 ([UIScreen mainScreen].bounds.size.height == 568)// 判断系统版本是否为7.0#define iOS7 ([[[UIDevice currentDevice]systemVersion]floatValue] >= 7.0) |
iPhone 屏幕适配判断 和 iOS系统版本判断,布布扣,bubuko.com
原文:http://www.cnblogs.com/swu-luo/p/3715622.html