#define IS_4_INCH_DEVICE CGSizeEqualToSize([UIScreen mainScreen].bounds.size, CGSizeMake(320, 568)) || CGSizeEqualToSize([UIScreen mainScreen].bounds.size, CGSizeMake(568, 320))
#define ISRETINA ([[UIScreen mainScreen] respondsToSelector:@selector(scale)])?([[UIScreen mainScreen] scale] == 2.0):(0)
*.pch 파일에 붙여 넣기
if(IS_4_INCH_DEVICE) {
// 4inch
}
else {
// 3.5inch
}
if(ISRETINA) {
// 4inch
}
else {
// 3.5inch
}