标签:ios
Retina (3.5/4 inch Screen) or Non-Retina 判断
if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)]) { if ([[UIScreen mainScreen] scale] == 2.0) { if([UIScreen mainScreen].bounds.size.height == 568){ // iPhone retina-4 inch } else{ // iPhone retina-3.5 inch } } else { // not retina display }
iOS6/iOS7 判断
NSString *ver = [[UIDevice currentDevice] systemVersion]; float ver_float = [ver floatValue]; if (ver_float >= 7.0) { //iOS >=7 } else{ //iOS <7 }
标签:ios
原文地址:http://blog.csdn.net/sirodeng/article/details/38779295